Skip to content

How to Install and Use Multipass on Ubuntu

How to Install and Use Multipass on Ubuntu

Multipass is Canonical’s lightweight virtual machine manager that launches Ubuntu VMs with a single command. It’s designed for developers who want a fresh Ubuntu environment quickly.


Prerequisites

  • Ubuntu 16.04+
  • Root or sudo access
  • Internet connection
  • KVM-enabled kernel (Linux)
  • At least 2GB RAM available
  • 5GB free disk space
Note: Multipass uses KVM on Linux, Hyper-V on Windows, and HyperKit on macOS.

Method 1: Install via Snap (Recommended)

Step 1: Install Snapd (if needed)

sudo apt update && sudo apt install snapd -y

On Ubuntu 16.04+, snapd is already pre-installed.

Step 2: Install Multipass

sudo snap install multipass

Step 3: Verify Installation

multipass version
Success! Multipass is installed!

Method 2: Install Edge Version

sudo snap install multipass --edge

Launch Your First VM

Launch Default VM

multipass launch --name myvm

This launches the current Ubuntu LTS with a random name.

Launch Specific Version

multipass launch 22.04 --name jammy-vm
multipass launch 24.04 --name noble-vm

Launch with Custom Resources

multipass launch --name dev-vm --mem 4G --disk 20G --cpus 2

Basic Commands

List VMs

multipass list

Connect to VM Shell

multipass shell myvm

Or use:

multipass exec myvm -- bash

Run Command in VM

multipass exec myvm -- sudo apt update
multipass exec myvm -- ls -la

Stop/Start VM

multipass stop myvm
multipass start myvm

Delete VM

multipass delete myvm
multipass purge

Find Available Images

multipass find

Shows available Ubuntu images:

  • lts – Current LTS
  • 22.04 – Ubuntu 22.04 LTS
  • 24.04 – Ubuntu 24.04 LTS
  • daily – Daily build

Using cloud-init

Pass a cloud-init config to customize VMs on launch:

multipass launch --name custom-vm --cloud-init config.yaml

Example cloud-init Config

#cloud-config
packages:
  - git
  - curl
  - vim
users:
  - name: developer
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash

Using Primary Instance

Multipass assigns special treatment to the primary instance:

multipass launch --name primary
  • Files from ~/CloudDocs appear in the VM
  • Hotkey access to VM shell

Configure Driver

Set Default Driver

sudo multipass set local.driver=qemu

Available drivers:

  • qemu – Default on Linux (KVM)
  • libvirt – Use existing libvirt setup
  • virtualbox – VirtualBox backend

Manage Multipass

Check Status

systemctl status multipass

Restart Service

sudo systemctl restart multipass

Get Aliases

multipass aliases

Get Info

multipass info myvm

Mount Files

Share directories between host and VM:

multipass mount /path/on/host myvm:/path/in/vm
multipass mount ~/projects myvm:/home/ubuntu/projects

Unmount

multipass umount myvm:/path/in/vm

Useful Workflows

Create Dev Environment

multipass launch --name dev --mem 4G --disk 40G --cpus 4
multipass exec dev -- sudo apt update
multipass exec dev -- sudo apt install -y docker.io docker-compose

Clone VM

multipass launch --name clone --disk 10G < original.qcow2

Troubleshooting

KVM Not Available

Error: /dev/kvm not found
sudo modprobe kvm
sudo modprobe kvm_intel  # for Intel
sudo modprobe kvm_amd    # for AMD

VM Stuck

multipass stop -f myvm
multipass start myvm

Permission Denied

sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER

Clean Up

multipass clean
Note: Run ‘logout’ and log back in after adding to groups.

Uninstall Multipass

sudo snap remove multipass

Conclusion

Multipass is now installed! You can now:

  • Launch Ubuntu VMs with a single command
  • Access VM shell instantly
  • Use cloud-init for customization
  • Mount directories between host and VM
  • Create dev environments quickly
Pro Tip: Use ‘multipass help’ for more commands and options.