OrbStack Linux Machines: Create and Use Linux on a Mac

Ubuntu, Debian, Fedora and more as lightweight machines that feel like part of macOS.

By OrbStack.org Editorial TeamPublished November 12, 20263 min read
Illustration for OrbStack Linux Machines: Create and Use Linux on a Mac

Besides Docker, OrbStack can run full Linux distributions as lightweight "machines" on your Mac. They behave much like WSL on Windows: they start in seconds, share files with macOS and are reachable over the network without setup. This guide shows how to create and use them.

Machines vs containers

A container usually runs a single process from an image and is thrown away when it stops. A machine is a full, long-lived Linux system with an init system, users and a package manager. Use containers for apps and services, and machines when you want a Linux environment to work in.

Supported distributions

OrbStack offers popular distributions including Ubuntu, Debian, Fedora, Arch Linux, Alpine, Rocky Linux and others, in several versions. Pick one in the Machines tab of the app or name it on the command line.

Create a machine

terminal
orb create ubuntu dev
orb list
orb -m dev

The first command creates an Ubuntu machine named dev, the second lists your machines, and the third opens a shell inside it. Your Mac username is created in the machine for you.

Sharing files

Your Mac's files are available inside machines at the same paths, such as /Users/you/projects. In the other direction, each machine's files appear in Finder under ~/OrbStack. That means you can edit code in a Mac editor and build it inside Linux without copying files around.

Networking and SSH

terminal
ssh orb
ssh dev@orb

OrbStack provides SSH access to machines, which makes them easy to use with editors that support remote development. Each machine also gets a domain such as dev.orb.local, so a web server running inside it is reachable from your Mac's browser.

Running Mac commands from Linux

inside the machine
mac open https://orbstack.dev
mac uname -a

The mac command runs a command on the macOS side, which is handy for opening files or URLs from inside Linux.

Managing machines

terminal
orb stop dev
orb start dev
orb delete dev

Deleting a machine removes its files under ~/OrbStack. Copy anything important to your Mac first.

Practical uses

  • Building and testing Linux binaries before deploying.
  • Running systemd services the way they'll run in production.
  • Practising Linux administration without a second computer.
  • Using x86 Linux machines on Apple Silicon for older toolchains, via Rosetta.

Choosing an architecture

terminal
orb create --arch amd64 ubuntu legacy

On Apple Silicon, machines run as arm64 by default for the best speed. When you need x86 software, create an amd64 machine; it runs through Rosetta, which is slower than native but far faster than full emulation.

Resource use

Machines share OrbStack's memory pool, so idle machines cost very little. Stop machines you aren't using, and set resource limits in OrbStack's settings if you run heavy workloads alongside other apps.

Tips

Keep project files on the Mac side so they stay in your backups, and treat machines as replaceable. If you need a clean environment, delete the machine and create a new one in seconds.

Get OrbStack 2.2.3

Free for personal use. macOS 14+, Apple Silicon build.