Running Ubuntu virtual machine on mac m1 using Canonical Multipass

Placeholder image

Luiz

Dec 22, 2022

Canonical Multipass is a tool that allows you to quickly and easily launch and manage virtual machines on your computer. Whether you’re a developer looking to test your code on different operating systems or a user who wants to run multiple instances of your favorite Linux distribution, Multipass is a convenient and powerful tool that can help you get up and running quickly.

In this tutorial, we’ll walk you through the steps of installing and using Canonical Multipass on your computer.

Install Canonical Multipass

The first step to using Multipass is to install it on your computer. You can download the latest version of Multipass from the Canonical website (https://multipass.run/download). Select the option to download the version for your operating system, and follow the on-screen instructions to complete the installation.

Launch an Instance

Once you have installed Multipass, you can use the multipass command in the Terminal to launch a new instance of a Linux distribution. For example, to launch an instance of Ubuntu, you can use the following command:

multipass launch --name my-instance

This will create a new VM with the name “my-instance” and launch it on your computer. You can use the multipass list command to view all of the running instances on your machine.

Connect to an Instance

To connect to a running instance, use the multipass shell command followed by the name of the instance. For example:

multipass shell my-instance

This will open a terminal window connected to the instance, allowing you to interact with it as if you were logged into a remote server.

Stop and Delete an Instance

When you are finished using an instance, you can use the multipass stop command to shut it down. For example:

multipass stop my-instance

If you no longer need an instance and want to delete it, you can use the multipass delete command. For example:

multipass delete my-instance

This will delete the instance and release any resources it was using.

Tags