Skip to content

Instantly share code, notes, and snippets.

@lafarer
Last active October 5, 2022 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lafarer/615ec8a63895796a2f6640de641476de to your computer and use it in GitHub Desktop.
Save lafarer/615ec8a63895796a2f6640de641476de to your computer and use it in GitHub Desktop.
Run ubuntu VM with multipass on Mac

Install multipass

> brew install multipass

Install Microsoft Remote Desktop

> brew install microsoft-remote-desktop

List available images

> multipass find
Image                       Aliases           Version          Description
snapcraft:core18            18.04             20201111         Snapcraft builder for Core 18
snapcraft:core20            20.04             20210921         Snapcraft builder for Core 20
snapcraft:core22            22.04             20220426         Snapcraft builder for Core 22
18.04                       bionic            20220921         Ubuntu 18.04 LTS
20.04                       focal             20220920         Ubuntu 20.04 LTS
22.04                       jammy,lts         20220923         Ubuntu 22.04 LTS
anbox-cloud-appliance                         latest           Anbox Cloud Appliance
charm-dev                                     latest           A development and testing environment for charmers
docker                                        latest           A Docker environment with Portainer and related tools
jellyfin                                      latest           Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media.
minikube                                      latest           minikube is local Kubernetes

Launch VM

> multipass launch 22.04 -n ubuntu-jammy -c 2 -m 4G -d 50G

Install desktop environment

> multipass shell ubuntu-jammy
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-48-generic x86_64)

$ sudo apt update
$ sudo apt install ubuntu-desktop xrdp -y
$ sudo snap install snap-store chromium

Change default ubuntu password

$ sudo passwd ubuntu 

Create a new OS user

$ sudo adduser username
$ sudo usermod -aG sudo username

Connect to the VM in graphical mode

Use the VM's ip address as PC name

> multipass info ubuntu-jammy
Name:           ubuntu-jammy
State:          Running
IPv4:           192.168.64.3
Release:        Ubuntu 22.04.1 LTS
Image hash:     0fcb96fbfd71 (Ubuntu 22.04 LTS)
Load:           0.00 0.06 0.18
Disk usage:     5.4G out of 48.3G
Memory usage:   2.0G out of 3.8G
Mounts:         --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment