How to quickly launch Ubuntu virtual machine with Multipass

If you're a developer or a system administrator, you'll want to be able to quickly create virtual machines on a Linux distribution for testing. There are many different solutions, such as Docker, VMWare, VirtualBox, Vagrant, etc.

Multipass is a lightweight virtual machine manager that allows you to easily and quickly launch an Ubuntu virtual machine. Here is how you can do so.

How to set up Multipass

Multipass is available for Windows, macOS and Linux. For Windows and macOS, you can download the relevant packages and install them like any regular application. Just be aware that for Windows, you will need to install VirtualBox or Hyper-V. Hyper-V is only compatible with Windows 10 Pro and Windows 10 Enterprise. After installation, you can use Multipass from the Terminal.

For Linux, you can install Multipass using Snaps. After installing snapd, you can install Multipass with the command:

sudo snap install multipass --classic

Use Multipass

After installing Multipass, you can launch an instance (specific case) with:

multipass launch --name instance-name
How to quickly launch Ubuntu virtual machine with Multipass Picture 1 Launch an instance with Multipass

By default, this command will download the current Ubuntu LTS (at the time of writing it is Ubuntu 20.04). You can set up multiple instances with Multipass (with different names) and then use them for different purposes. You can view installed instances with:

multipass list
How to quickly launch Ubuntu virtual machine with Multipass Picture 2 View installed instances

You can also start and stop instances as you like with:

multipass start instance-name multipass stop instance-name

Multipass allows you to interact with and run commands within the virtual machine. To do this, you need to run the command:

multipass exec instance-name -- sudo apt update

The uses of Multipass

Multipass is useful from a development standpoint, because you can quickly test code on different versions of Ubuntu. However, it also has other great uses.

Run Linux GUI applications on macOS

You can use XQuartz to display Linux GUI applications on macOS. To do this, you will have to set XQuartz to Allow connections from network clients . Once completed, you can install the application whose GUI you want to see in a Multipass instance. You can then ask Multipass to open the application by pointing it at the computer's IP address.

Run Pi-Hole

Pi-Hole is a popular network-based ad blocker for Linux. You can set this ad blocker all over the network with the Raspberry Pi, but it's a bit more convenient to set this up with Multipass.

Set up a Kubernetes Cluster on Windows

How to quickly launch Ubuntu virtual machine with Multipass Picture 3 Set up a Kubernetes Cluster on Windows

Kubernetes allows you to manage workloads and services in a container. This allows for more efficient management of system resources. Kubernetes is a great option for running effective applications. You can use Multipass to set up Microk8s on a Multipass instance. This allows you, essentially, to deploy a container with Kubernetes from a Windows machine.

3.8 ★ | 33 Vote

May be interested

  • Use Speedtest CLI to check Internet speed on Debian 10Photo of Use Speedtest CLI to check Internet speed on Debian 10
    in this article, tipsmake.com will use a linux command line tool named speedtest-cli. it is written in python and uses speedtest.net to check bandwidth.
  • How to share a mobile connection from any smartphone to LinuxPhoto of How to share a mobile connection from any smartphone to Linux
    what if you need to keep your linux computer online but don't have wireless or ethernet? the answer is to use tethering. with your smartphone, you can share mobile internet with your computer.
  • How to upgrade to Fedora 32Photo of How to upgrade to Fedora 32
    if you are upgrading to fedora 32, there are several ways to do so. in this article, readers will learn how to upgrade with the graphics tools available through gnome software and the command line with dnf plugin, dnf-plugin-system-upgrade.
  • How to change icons in Gnome 3Photo of How to change icons in Gnome 3
    if you don't like the current files and folders in gnome, you can use a different theme icon. you can change any file or folder icon into a custom icon.
  • Top 5 Linux certifications for 2020Photo of Top 5 Linux certifications for 2020
    if you are looking for a better position in the linux field, obtaining certain certifications is a must. so, let's explore the top 5 linux certifications you should consult if you're going to be far in this area.
  • From today, owning Linux LPI certificate will be easier!Photo of From today, owning Linux LPI certificate will be easier!
    lpi (linux professional institute), a world leader in international linux certification for open source professionals, has officially entered the vietnamese market.