Setup an Ubuntu Virtual Machine on MacOS with the UTM Emulator

Jordan Frey · July 20, 2025

At work, I do most of my development in Ubuntu via WSL, and I’ve grown to really enjoy working in a Linux environment. For personal projects, I wanted to stick with Linux, but my home machine runs macOS. To bridge the gap, I turned to UTM — a free, open-source virtualization and emulation tool for macOS. While UTM is a great option and alternative to Parallels, setting up a Linux VM with it does involve a bit of extra effort.

In this post, I’ll walk through how to set up an Ubuntu VM in UTM and configure it so you can SSH into it from your macOS host. If you only need terminal access, SSH is recommended over using the UTM GUI for a smoother and more efficient experience.

  1. Install UTM
  2. Download your desired Ubuntu instance (use ARM compatible ISO’s for M-series Macs).
  3. Follow all the steps found here: https://www.youtube.com/watch?v=1PL-0-5BNXs
  4. Go to the UTM network settings for your new VM
  5. Change the “Network Mode” to “Emulated VLAN”
  6. Go to port forwarding and select these options:
Port forwarding Figure 1
  1. Start your Ubuntu instance and log in
  2. Ensure you can allow for other machines to ssh into the Ubuntu guest machine by running
    1. sudo apt install openssh-server
    2. sudo systemctl enable ssh
  3. In your host terminal, run ssh -p 22022 <username>@localhost

Twitter, Facebook