Article

Multipass: Your Gateway to Effortless Virtual Machines

4 min read
Originally published on Medium. Read, clap or comment on Medium ↗

If you’ve ever struggled with the complexity of setting up virtual machines or found yourself juggling multiple development environments, Multipass might just become your new favorite tool. Think of it as Docker for Ubuntu VMs — lightweight, fast, and surprisingly simple.

What Exactly Is Multipass?

Multipass is Canonical’s lightweight VM manager designed to make spinning up Ubuntu instances as easy as running a single command. Whether you’re on Windows, macOS, or Linux, Multipass gives you access to a clean Ubuntu environment in seconds, not minutes.

The beauty of Multipass lies in its simplicity. While tools like VirtualBox or VMware offer extensive configuration options, Multipass strips away the complexity and focuses on one thing: getting you a working Ubuntu VM fast.

Why Should You Care?

Consider these common scenarios:

Testing applications across different Ubuntu versions without cluttering your main system. Need to verify your app works on Ubuntu 22.04 and 24.04? Launch two instances in seconds.

Learning Linux in a safe sandbox where mistakes won’t break your computer. Delete the instance and start fresh whenever you need to.

Development environments that are isolated and reproducible. Share your cloud-init configuration with teammates so everyone has identical setups.

CI/CD pipelines where you need quick, disposable test environments that spin up and tear down rapidly.

Getting Started: Your First Instance

Installation is straightforward. On macOS, use Homebrew:

brew install multipass

On Windows, download the installer from the official website. On Linux, use snap:

sudo snap install multipass

Now comes the magical part. To launch your first Ubuntu VM:

multipass launch --name dev-box

That’s it. In less than a minute, you have a fully functional Ubuntu VM running. Connect to it with:

multipass shell dev-box

You’re now inside your Ubuntu instance, ready to work.

Essential Commands You’ll Use Daily

Multipass keeps its command set minimal and intuitive:

List all instances to see what you’re running:

multipass list

Get detailed information about an instance:

multipass info dev-box

Stop an instance when you’re done:

multipass stop dev-box

Start it again when you need it:

multipass start dev-box

Delete instances you no longer need:

multipass delete dev-box
multipass purge

The delete command moves instances to trash, while purge permanently removes them.

Customizing Your Instances

Multipass shines when you need specific configurations. Want more resources? Specify them at launch:

multipass launch --name powerful-box --cpus 4 --memory 8G --disk 50G

Need a specific Ubuntu version?

multipass launch 22.04 --name legacy-box

You can even use cloud-init to automate setup. Create a YAML file with your configuration:

#cloud-config
packages:
- docker.io
- nodejs
- npm
runcmd:
- sudo systemctl enable docker
- sudo systemctl start docker

Then launch with:

multipass launch --name auto-box --cloud-init config.yaml

Your instance boots up with everything pre-installed.

Mounting Local Directories

One of Multipass’s most useful features is seamless file sharing between your host and VMs:

multipass mount ~/projects dev-box:/home/ubuntu/projects

Now you can edit files on your host machine using your favorite IDE while running them inside the VM. It’s the best of both worlds.

Real-World Workflow Example

Here’s how you might use Multipass for a typical development project:

  1. Launch an instance with your preferred specs
  2. Mount your project directory
  3. Shell into the instance and set up your development environment
  4. Work on your code locally while testing in the VM
  5. Stop the instance when done to free up resources
  6. Start it again tomorrow and pick up right where you left off

When the project is complete, delete the instance. No leftover dependencies or configuration cluttering your system.

Advanced Tips

Aliases make life easier. Create a primary instance and alias it:

multipass alias dev-box:docker docker

Now you can run docker commands directly from your host terminal, and they'll execute inside the VM.

Transfer files quickly without mounting:

multipass transfer file.txt dev-box:/home/ubuntu/

Execute commands without entering the shell:

multipass exec dev-box -- sudo apt update

When to Use Multipass vs. Other Tools

Multipass isn’t a replacement for everything. Use Docker for containerized applications where you need extreme portability. Use full-featured VMs like VirtualBox when you need non-Ubuntu systems or complex networking setups.

But when you need a quick, disposable Ubuntu environment, Multipass is unbeatable. It’s particularly brilliant for testing, learning, and development workflows where you want the isolation of VMs with the speed of containers.

The Learning Path Forward

Start simple. Launch an instance, explore it, break it, delete it, and launch another. That’s the point — Multipass makes experimentation risk-free and fast.

Try automating your setup with cloud-init configurations. Practice mounting directories and transferring files. Experiment with multiple instances running simultaneously.

Before long, you’ll wonder how you ever managed development environments without it.

Final Thoughts

Multipass represents a philosophy: powerful tools don’t need to be complicated. By focusing on doing one thing exceptionally well — managing Ubuntu VMs — it creates an experience that feels almost magical in its simplicity.

Whether you’re a developer, system administrator, student, or hobbyist, Multipass deserves a place in your toolkit. Download it, launch your first instance, and discover how effortless virtual machines can be.

← All articles Discuss on Medium ↗