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

  • How to Tune a Java Virtual Machine (JVM)How to Tune a Java Virtual Machine (JVM)
    the java virtual machine (jvm) runs your java programs. sometimes the default configuration that the jvm comes with may not be the most efficient for your program.
  • Why You Should Have a Virtual Machine in HandWhy You Should Have a Virtual Machine in Hand
    if you like to experiment with different operating systems, are afraid that trying new programs might crash your pc, or need a separate system to run certain programs, a virtual machine (vm) can be quite useful.
  • Instructions for installing Ubuntu on VMware Workstation - Part 2Instructions for installing Ubuntu on VMware Workstation - Part 2
    in the previous section of the article, we jointly established vmware and ubuntu desktop. and the next section below, please continue with the steps to install ubuntu desktop on vmware workstation.
  • Instructions for installing Ubuntu on VMware Workstation - Part 1Instructions for installing Ubuntu on VMware Workstation - Part 1
    for some reason, can't you continue to use windows (royalties)? you want to discover a certain operating system that is enough to replace the already familiar windows? you just need 1 software, some operating system to meet the needs of working very simple? check out the free and completely open source ubuntu operating system.
  • 5 best virtual machines for Windows 11 PCs5 best virtual machines for Windows 11 PCs
    ever wondered if you could play your favorite android games on your windows pc with all its processing power? or, do you want to try other operating systems without erasing the windows operating system and all the precious data on it?
  • Stealing virtual machines and virtual machine dataStealing virtual machines and virtual machine data
    there are basically two ways to access a virtual disk file (.vmdk) of a virtual machine, which is using the esx service console or vsphere / vmware infrastructure client with a built-in data warehouse browser.
  • Instructions for connecting USB to virtual machineInstructions for connecting USB to virtual machine
    when installing an operating system on a virtual machine using virtual software, usb recognition may fail, making it difficult to copy data. to connect a usb to a virtual machine, follow these steps.
  • Install Ubuntu in Windows using the Wubi InstallerInstall Ubuntu in Windows using the Wubi Installer
    you want to find a solution to try ubuntu but don't like the idea of ​​creating a partition, using the cd drive directly, or not having enough resources to run a virtual machine. try using the wubi installer program to run to ubuntu.
  • Steps to install windows 11 on virtual machine, how to install windows 11 on VMwareSteps to install windows 11 on virtual machine, how to install windows 11 on VMware
    in this article, tipsmake.com will show you how to install and experience windows 11 on a vmware virtual machine. this installation method helps you have a smooth running version of windows 11 with an internet connection.
  • How to import Hyper-V virtual machines in Windows 10How to import Hyper-V virtual machines in Windows 10
    you can use hyper-v export and import functions to quickly copy virtual machines. virtual machines can then be used to back up data, or it could be a way to move a virtual machine between hyper-v servers.