Osegi
Software·2 min read

XNU Linux runs the macOS kernel as a Linux module, no VM

A new open-source project loads Apple's XNU kernel inside Linux, so macOS apps like Safari and Finder run next to Linux processes without a virtual machine.

A Linux desktop running macOS windows such as Finder and Safari alongside the Dock.
Image: Hipertextual

Running macOS apps on Linux without a virtual machine has been a long-standing wish. A developer now has a different answer: XNU Linux, an open-source project that loads the macOS kernel as a module inside Linux.

Windows software on Linux is mostly solved thanks to Wine. macOS is another story. Darling, a project that also skips the virtual machine, is still experimental. XNU Linux takes another route. It compiles XNU, the kernel at the heart of macOS, and runs it alongside Linux on the same hardware. According to the GitHub repository, macOS processes run natively next to Linux ones, with no hypervisor involved.

How does XNU Linux work?

Linux stays in charge as the host. It manages memory, storage, networking and GPU access. XNU runs as a module and provides what macOS apps need. Each system keeps its own separate user space.

Two components do the heavy lifting. The first, xnu.ko, loads and runs the macOS kernel. The second, fki.ko, is a bridge that gives XNU access to essential functions of the host. A second bridge lets macOS use the Linux GPU through Vulkan.

It is experimental, but it already boots a working macOS install. The repository shows a full desktop with the Dock, Finder and Safari running on Linux. Notes, Calculator, TextEdit, Safari and System Settings open and close correctly in testing, and Spotlight and the file system work. In a stress test, the developers ran these apps repeatedly for 30 minutes without crashes or freezes.

What are the limits?

You need an ARM64 computer, so ordinary x86 PCs are out. Compatible machines include Copilot+ PCs and NVIDIA's DGX Spark, though the latter only supports CPU rendering. NVIDIA GPU support is not implemented yet.

Performance is also below that of a native virtual machine, because the project uses 4 KB memory pages instead of 16 KB. And you need your own legitimate macOS install, since the repository does not include the binaries to build the environment.

Still, it is one of the more ambitious attempts to bring macOS to Linux. If it matures, you could use macOS apps without leaving your favourite distribution.

Apps worth a look

SUMO: the number puzzle

Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.

Tags:linuxmacosxnu linuxopen sourcekerneldarling

More from this day

See all →

More in: Software

See all →