Marcio Cunha

How to run lightweight Linux virtual machines on Mac with OrbStack

Learn how to create, provision, and integrate lightweight Linux virtual machines on macOS using OrbStack, comparing the experience with UTM and VirtualBox.

Marcio Cunha•4 min
Also available in:PortuguêsEspañol
Summary
  • OrbStack revolutionizes the macOS ecosystem by running Linux virtual machines with minimal battery and RAM consumption.
  • Deep integration with the system's network layer allows access to containers and VMs directly via local domain names.
  • Traditional tools like VirtualBox and UTM require complex network adapter setups and extra drivers to run smoothly.
  • Provisioning Linux instances via the command line takes seconds, streamlining infrastructure testing and automation.
  • Transitioning heavy workflows dramatically improves productivity for engineers relying on Linux environments.

Why is running Linux environments on Mac still a challenge?

Software development on macOS often requires executing Linux environments for testing, staging, or simulating production servers. Historically, this task consumed massive amounts of machine resources, causing lag and quickly draining battery life. To mitigate this issue, professionals relied on traditional virtualization tools like VirtualBox or UTM, which simulate entire computers inside your main system. In practice, this means each virtual machine must carry its own kernel (the operating system core that manages hardware) and allocate rigid slices of RAM, even when sitting idle. If you have ever felt your Mac heat up and freeze while running isolated environments, you know exactly how heavy this approach can be.

What makes OrbStack different from traditional virtual machines?

OrbStack emerges as a modern alternative focused on speed, lightness, and native integration with Apple silicon chips (M1, M2, M3, and M4 series) as well as Intel Macs. Unlike a heavy emulator, it uses optimized macOS kernel technologies to handle isolation extremely efficiently. Before adopting this tool, many developers struggled with traditional Docker slowness, a topic we explore in depth in our guide on how to migrate from heavy Docker Desktop to OrbStack. Instead of simulating a complete motherboard, OrbStack creates Linux instances that share resources fluidly, cutting startup time to under two seconds and consuming a tiny fraction of the memory VirtualBox would demand.

How to create and provision a Linux virtual machine in seconds

Creating a clean Linux distribution like Ubuntu, Debian, or Fedora inside OrbStack skips complex graphical wizards and endless configuration buttons. Everything is done directly through your terminal's command line, allowing you to spin up a complete operating system environment in record time. For those managing multiple services efficiently, it is also worth checking out the tips on how to adjust resources and network in OrbStack to prevent bottlenecks. The command below illustrates how easy it is to create and start a new Ubuntu-based virtual machine in your terminal:

orb create ubuntu my-linux-vm
orb start my-linux-vm
orb -m my-linux-vm

In practice, the <orb create> command downloads a clean image of the chosen system, the <orb start> parameter launches the instance almost instantly, and the final command connects you straight to the internal terminal of the newly created machine, ready to receive package installations and service configurations.

Network integration and file sharing without the headache

One of the biggest pain points of older virtual machines has always been network configuration and accessing local Mac folders. In VirtualBox, for example, you had to manually set up complex port forwardings, static IP addresses, and shared directories that frequently broke due to user permissions. With OrbStack, this barrier completely disappears thanks to automatic local DNS resolution. Any web server or application you run inside your Linux virtual machine becomes instantly accessible in your Mac browser using a simple address like <your-vm.orb.local>. Furthermore, your local code directories are mapped transparently, letting you edit files in Visual Studio Code on macOS and run tests inside Linux without manually copying files.

Practical comparison: OrbStack versus UTM and VirtualBox

To understand which tool fits your daily workflow best, it helps to look at the operational trade-offs of each. VirtualBox shines when you need complete emulation of different hardware architectures (such as running an old x86 system on a Mac), but it extracts a heavy toll in sluggishness, excessive energy consumption, and a dated interface. UTM, although excellent for running full graphical systems and even vintage operating systems on Apple Silicon, still adds an extra virtualization layer that consumes more memory than necessary for everyday backend development tasks. OrbStack bypasses heavy physical hardware emulation to focus strictly on Linux and container execution speed, making it unbeatable for engineers who need a fast, integrated, and friction-free command-line environment.

Final thoughts on productivity with Linux on macOS

Adopting OrbStack to manage Linux virtual machines on macOS transforms how we handle local development, eliminating the technical friction that used to delay deliveries. By replacing bloated solutions with a lightweight architecture optimized for modern Apple processors and focused on user experience, we gain precious time and operational stability. If your goal is to run test servers, validate automation scripts, or simply have a dedicated Unix environment without sacrificing your laptop's battery, this tool delivers an immediate and measurable productivity boost to your daily workflow.