Multipass – Run Ubuntu VMs on Demand for Any Linux System

Before we dive into installing Multipass, we must first understand the importance and implications of virtual machines in the operating systems ecosystem.

A virtual machine is an emulating software that can mock the behavior of a different operating system or hardware architecture on top of the host operating system. Virtual Machines mirror a physical computer’s functionality.

Multipass lets you create Ubuntu VMs that are functional on any workstation. By executing a single command, you get an instant Ubuntu VM up and running.

Also, Multipass lets you configure your VMs to emulate a public cloud infrastructure via cloud-init. It also does not cost you anything to locally prototype such cloud launches.

In summary, with Multipass, a command-line interface lets you launch, manage, and explore Linux instances.

Installing Multipass in Linux

The installation environment for Multipass should be up-to-date for optimal performance of both the operating system and its installed or yet-to-be installed software packages.

$ sudo apt update && sudo apt upgrade -y 

Since Multipass software is available on Snap, we can install it with the following command:

$ sudo snap install multipass 

The installation process should take a minute or two to successfully complete.

Install Multipass in Linux
Install Multipass in Linux

Using Multipass in Linux

The first step in using Multipass is to check the availability of associated images:

$ multipass find
Multipass Find Ubuntu Images
Multipass Find Ubuntu Images

To launch an instance, first identify the Image name from the above command output. To launch let’s say Image core for Ubuntu core 16, we will execute the following command:

$ multipass launch core
Multipass Launch Ubuntu Image
Multipass Launch Ubuntu Image

If any of your Multipass command execution processes are interrupted, restart it with the command:

$ sudo snap restart multipass  

Now that we have launched an instance, we need to check on its running state with the command:

$ multipass list
Multipass Check Ubuntu Image
Multipass Check Ubuntu Image

We can further check on this running instance’s VM with the command:

$ multipass info ethereal-ermine 
Multipass Check Ubuntu Information
Multipass Check Ubuntu Information

Since we have confirmed that the Ubuntu instance is running, we can connect to it with the command:

$ multipass shell ethereal-ermine 
Multipass Connect Ubuntu Image
Multipass Connect Ubuntu Image

From here, we can execute normal commands associated with the Instance VM like updates, installations, configurations, and even checking the instance release.

Multipass Run Commands in Ubuntu Image
Multipass Run Commands in Ubuntu Image

To stop and/or delete a running instance:

$ exit
$ multipass stop ethereal-ermine 
$ multipass delete ethereal-ermine 

With this guide, you should now be confident in navigating around Multipass VM instances. While using a VM instance, consult snap help --all for appropriate command syntax.

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.