Skip to content
86% off$349 $48.86code BF2026

Guides

How to Run Linux on a Mac (Apple Silicon)

Run Linux on an Apple silicon Mac: VMs, containers and dual boot compared, then a server in a minute, Ubuntu or Kali desktops, Rosetta, SSH and file sharing.

GuideUpdated 12 min read

On this page

To run Linux on an Apple silicon Mac, install the arm64 version of a Linux distribution in a virtual machine (VM). UTM (free as of November 2026), Parallels Desktop and our app Hermitbox can all do this. In Hermitbox, press ⌘N (Command-N) and choose Linux. Then pick a Ready in a Minute image for an Ubuntu, Debian or Fedora server you can SSH into, or an installer such as Ubuntu Desktop or Kali for a full desktop.

If you only need Docker containers, a container tool is lighter. If you want Linux running directly on the hardware instead of macOS, you need a dual-boot install.

We make Hermitbox, so weigh our view accordingly. We've tried to be fair to the other options.

What are your options to run Linux on a Mac: VM, containers or dual boot?

A virtual machine runs a complete Linux system, with its own kernel and desktop, in a window or in the background. macOS keeps running and you switch between the two like switching apps. This suits most people, including anyone who wants a Linux desktop, a test server or Kali.

Containers share one Linux kernel. On a Mac, container tools run that kernel inside a small Linux VM for you. They're the lighter choice if your goal is docker run, not a Linux desktop.

Dual boot installs Linux on the Mac's own disk next to macOS. You restart to switch systems and give Linux part of your drive. Apple's Boot Camp only ever supported Windows on Intel Macs, so on Apple silicon dual boot means a third-party project. We don't cover those here. Read the project's own documentation for supported Mac models before you partition anything.

OptionWhat you getx86-64 LinuxCost (as of November 2026)Pick it if
Hermitbox (VM)Linux servers and desktops, plus macOS VMs, with snapshots, a CLI and Shortcutsx86-64 programs through Rosetta; no x86-64 operating systemsPart of MacSuite, $349 one-time; 7-day free trialYou want SSH-ready servers and desktop VMs in one app
UTM (VM)Linux, Windows, macOS and classic systems via QEMU and Apple VirtualizationYes, through emulationFree; the Mac App Store version is paid only to support the projectYou want a free app, or need to boot an x86 operating system
Parallels Desktop (VM)A VM app centered on Windows 11, with Coherence mode, drag and drop between systems and a USB routing promptNot covered hereSubscription, billed yearly; Standard is capped at 4 vCPUs and 8 GB vRAMYou also need Windows on the same Mac
OrbStack (containers)Docker plus lightweight Linux machines (16 distros), Mac commands from Linux, SSH agent forwardingRosettaFree for personal use, paid for commercial useYou mostly run Docker or command-line Linux
Dual bootLinux directly on the hardwareNot covered hereDepends on the projectYou want Linux as your main system and your Mac model is supported

UTM is free and runs Linux VMs. If you need one Ubuntu VM now and then, it's enough. Hermitbox is worth paying for if you want SSH-ready servers without running an installer, snapshots and clones on macOS 14 or later (as of November 2026, UTM needs macOS 27 for these with its Apple Virtualization backend), or a menu bar, CLI and Shortcuts for your VMs. For a wider comparison, see the best virtual machine software for Mac.

Which Linux distributions run on Apple silicon (arm64)?

You need the distribution's arm64 build, often labeled "aarch64." Builds labeled "amd64" or "x86_64" are for Intel and AMD processors. Those won't boot in a VM on Apple silicon unless the app emulates an Intel CPU, which is slower than running arm64 directly.

Hermitbox lists these arm64 sources in the New VM assistant (as of November 2026):

DistributionReady in a Minute (cloud image, SSH ready)Installer ISO (gallery)
UbuntuUbuntu Server 26.04 LTSUbuntu Desktop 26.04.1 LTS, 24.04.5 LTS; Ubuntu Server 26.04.1 LTS, 24.04.5 LTS
DebianDebian 13Debian 13.7 Network Install
FedoraFedora Cloud 45Fedora Workstation 45, 44
Kali LinuxKali Linux 2026.3 Installer
Alpine LinuxAlpine Linux 3.24.4 Virtual
Rocky LinuxRocky Linux 10.2 Minimal
openSUSEopenSUSE Tumbleweed (Rolling)

For anything else, use Other ISO File… or From URL… (https links only) with an arm64 installer ISO. Gallery downloads are checked against the vendor's checksum list. ISOs you add yourself are not checked, so verify them first if the distribution publishes checksums.

These steps are the same on any Apple silicon Mac, M1 included. Hermitbox needs macOS 14 Sonoma or later.

The fastest way: a Linux server ready in a minute

Ready in a Minute skips the installer. Hermitbox downloads the vendor's arm64 cloud image, verifies its checksum, converts it to a disk of the size you choose, and configures Linux on first boot so SSH is ready. The image stays cached, so the next VM from the same image doesn't download it again.

For key-based SSH, Hermitbox uses the public keys in ~/.ssh/id_*.pub. If you don't have one yet, create it in Terminal on your Mac:

bash
ssh-keygen -t ed25519

This creates ~/.ssh/id_ed25519 (private) and ~/.ssh/id_ed25519.pub (public). Press Return to accept the default location, then set a passphrase or leave it empty.

  1. Open Hermitbox and press ⌘N, or click + in the toolbar.
  2. Select Linux and click Continue.
  3. Under Ready in a Minute, choose Ubuntu Server 26.04 LTS, Debian 13 or Fedora Cloud 45, then click Continue.
  4. On Name and Size, enter a Name. Keep the Recommended for this Mac sizes unless you know you need more. The usual Linux recommendation is 2 cores, 4 GB of memory and a 32 GB disk; the minimum is 1 GB of memory and 16 GB of disk. The disk only takes space on your Mac as Linux fills it.
  5. Check User. It defaults to your Mac's short user name.
  6. Turn on Allow SSH with this Mac's key(s).
  7. Enter a Password if you have no SSH key or want to log in at the VM's own screen. The field says "Optional" when keys exist and "Required" when they don't.
  8. Optional: turn on Add a desktop. It "Installs on first start, which then takes a few minutes longer," and raises the VM's memory.
  9. Click Create.
Hermitbox New VM Linux sources with Ubuntu Server 26.04 LTS selected under Ready in a Minute, above Recipes and Installers
Ready in a Minute: a cloud image with SSH set up.

On first boot, Linux configures itself from a cloud-init seed that Hermitbox builds on your Mac; no network service is involved. The seed sets up:

  • your user, with sudo
  • your SSH keys
  • your timezone
  • spice-vdagent for clipboard sharing, where the distribution has it
  • the shared-folder mount at /mnt/mac
  • Rosetta, if it's turned on
  • desktop packages, if you chose Add a desktop

Your password is stored only as a SHA-512 crypt hash in that seed. Downloaded images stay in ~/Library/Caches/Hermitbox/Images until you delete them from Downloads in the sidebar.

More detail: Linux ready in a minute.

How do you install a Linux desktop (Ubuntu, Fedora, Debian, Kali)?

There are two routes. Add a desktop on a Ready in a Minute image is the quickest. Use the distribution's own installer when you want a specific edition, such as Ubuntu Desktop, Fedora Workstation or Kali.

  1. Press ⌘N, select Linux and click Continue.
  2. Under Installers, click a distribution card and choose a version from its menu, for example Kali Linux 2026.3 Installer.
  3. Click Continue.
  4. On Name and Size, set Cores, Memory and Disk.
  5. Open Advanced to set Display (Fit to This Mac or a fixed size such as 1920×1200), Sound output, and Run Intel (x86-64) Linux programs with Rosetta.
  6. Click Create. Hermitbox downloads the ISO and checks it against the vendor's checksum.
  7. If the VM isn't running yet, double-click its box or press ⌘R (Command-R).
  8. Click inside the VM window to give it the keyboard. Press and release ⌃⌥ (Control-Option) to give the keyboard back to your Mac.
  9. Run the distribution's installer as you would on a PC. Debian's Network Install downloads packages during setup, so stay online.
  10. When setup finishes and Linux reboots, the VM stops and Hermitbox asks Finished Installing? Click Eject and Start so the VM boots from its own disk.

Once Linux is installed, resizing the window changes its resolution when Resize with the window is on (VM Settings ▸ Display; needs a recent Linux). Press ⌃⌘F (Control-Command-F) for full screen. Before risky changes, press ⇧⌘S (Shift-Command-S) to take a snapshot. On an APFS disk, a snapshot is instant and takes no space until the VM changes.

A note for Kali users: Hermitbox can't pass USB devices through to a VM, so an external Wi-Fi adapter can't be handed to Kali, and the VM's network is NAT only. As of November 2026, UTM lists USB passthrough (on macOS 27 or later with its Apple Virtualization backend) and Parallels Desktop lists a USB routing prompt.

For an Ubuntu-specific walkthrough, see how to run an Ubuntu VM on a Mac.

How do you run x86-64 Linux programs with Rosetta?

Apple's Rosetta can run x86-64 Linux programs inside an arm64 Linux VM. It translates programs only; you still can't boot an x86-64 ISO this way.

  1. Select the VM in the library and find the Linux section of the inspector on the right.
  2. If it says "Rosetta for Linux isn't installed on this Mac.", click Install Rosetta… and follow Apple's installer.
  3. Turn on Rosetta for Intel programs.
  4. Shut the VM down and start it again. The change applies at the next start.
  5. If you installed from an ISO, open Set Up in Linux and choose your Distribution (Debian/Ubuntu, Fedora or Other).
  6. Copy each step into a Linux terminal and run it: Mount Rosetta, Register it for x86-64 programs, then Mount it at every start.

Ready in a Minute VMs skip steps 5 and 6, because Hermitbox sets Rosetta up for them automatically when it's on. Rosetta is on by default for new Linux VMs if it's already installed on your Mac.

Self-contained (static) binaries usually run as they are. Programs that load shared libraries also need the x86-64 versions of those libraries inside Linux.

One trade-off: on some macOS versions, a VM with Rosetta on can't be suspended, only shut down. More in running x86-64 Linux programs with Rosetta.

How do you share files and the clipboard with Linux?

You can't drag files between a Mac window and a VM window in Hermitbox. Use shared folders for files and the clipboard for text.

Shared folders

  1. Select the VM and open Shared Folders in the inspector, or click Sharing in the VM window toolbar.
  2. Click Add Folder…, or drop folders from Finder onto the list.
  3. Tick Read only for any folder Linux shouldn't change.
  4. Mount the share in Linux. Ready in a Minute VMs already do this at every start. On other VMs, run:
bash
sudo mkdir -p /mnt/mac && sudo mount -t virtiofs hermitbox /mnt/mac

This creates /mnt/mac and mounts your shared folders there until Linux shuts down. Each folder appears under /mnt/mac.

To mount them at every start, add this line to /etc/fstab (editing it needs sudo). Delete the line to undo it.

text
hermitbox /mnt/mac virtiofs rw,nofail 0 0

The Mount in Linux section in Hermitbox has both commands ready to copy.

Clipboard

Clipboard sharing is on by default for new Linux VMs. Switch it with Clipboard in the VM window's Sharing popover or Clipboard sharing in the inspector. Linux needs spice-vdagent. Most desktop installs already include it, and Set Up in Linux shows the install command for your distribution. Changes take effect the next time the VM starts.

More: Share folders and the clipboard. For moving files between a Mac and a separate Linux computer, see how to share files between Mac and Linux.

How do you SSH in or use VS Code Remote-SSH?

Every VM sits on a private NAT network. Your Mac reaches it by IP address, and the VM reaches the internet. Other devices on your network can't reach it directly, because Hermitbox has no bridged networking and no port forwarding.

  1. Start the VM and select it in the library.
  2. In the inspector, open Connect. Wait for IP Address to change from "Waiting for an address…" to an address.
  3. Check SSH User. It defaults to your Mac's user name and is remembered per VM.
  4. Click Open SSH and choose Open in Terminal, Open in iTerm (if installed), Open in VS Code or Copy SSH Command.
Hermitbox inspector Connect section for a running Ubuntu Server VM with IP Address 192.168.64.15, SSH User and Open SSH
The IP address and SSH user of a running Linux VM.

Open in VS Code opens a Remote-SSH link, so VS Code needs its Remote - SSH extension.

Ready in a Minute VMs accept SSH from the start. Desktop installs often don't run an SSH server. On Ubuntu or Debian, install one inside Linux with:

bash
sudo apt install openssh-server

On Fedora, install it and start it now and at every boot:

bash
sudo dnf install openssh-server && sudo systemctl enable --now sshd

To work from Terminal, install the hermitbox command-line tool in Hermitbox ▸ Settings ▸ Advanced ▸ Command line tool. The default location is ~/.local/bin, which must be in your PATH. Then:

bash
hermitbox start ubuntu --headless
hermitbox ssh ubuntu

The first command starts or resumes the VM named "ubuntu" without opening its window. The second opens an SSH session to it. Names are case-insensitive and a unique prefix is enough. hermitbox ip ubuntu prints just the address. More in Linux integration: Rosetta, agent, SSH and console.

Hermitbox is part of MacSuite; you can try it free for 7 days.

If it doesn't work

  • "Download Didn't Match": the file didn't match the publisher's checksum, so Hermitbox deleted it. Try again to get a fresh copy. "Can't Verify the Download" means the publisher's checksum list doesn't include the file; try later or pick another version.
  • The installer starts again after setup: the ISO is still attached. Click Eject and Start in the Finished Installing? prompt, or eject the installer from the VM window's toolbar.
  • Linux shuts off when you restart it: a restart started inside Linux stops the VM. Start it again with ⌘R.
  • Copy and paste does nothing: check that Clipboard is on and that spice-vdagent is installed in Linux, then shut down and start the VM. See copy and paste not working in a Mac VM.
  • /mnt/mac is empty: run the mount command above. If the VM started with no shared folders, folders you add appear after the next start.
  • SSH times out or is refused: wait until IP Address shows a value ("No IP Address Yet" means try again in a few seconds). Install an SSH server on ISO-installed systems, and make sure SSH User matches your Linux user name.
  • The Rosetta switch is grayed out: Rosetta isn't installed on the Mac. Click Install Rosetta…, turn the switch on, restart the VM, and run the Set Up in Linux steps.
  • Suspend isn't available: an attached installer disc, an attached serial console, and (on some macOS versions) Rosetta or Linux clipboard sharing all block suspend. Eject the disc, turn those off, or shut down instead.

FAQ

Can I run Kali Linux on an M1 Mac?

Yes, using Kali's arm64 build. In Hermitbox it's Kali Linux 2026.3 Installer in the Linux gallery. USB devices such as Wi-Fi adapters can't be passed through to the VM.

Can I run an x86-64 (amd64) Linux ISO on Apple silicon?

Not in Hermitbox, which runs arm64 systems on Apple silicon. Booting an x86-64 system needs emulation, which UTM offers as of November 2026. If you only need a few x86-64 programs, run them with Rosetta inside an arm64 VM.

Can I use Docker this way?

Hermitbox doesn't run containers itself, but you can install Docker inside a Linux VM like on any Linux server. If containers are all you need, a dedicated tool such as OrbStack is lighter.

Can Linux run its own VMs inside Hermitbox?

On macOS 15 or later, with hardware that supports it, the inspector shows a Nested Virtualization switch for Linux VMs. It lets Linux use KVM and takes effect the next time the VM starts.

To set up a first VM of any kind, see how to run a virtual machine on a Mac.

Every app.
One purchase.