The xnulinux project has pulled off something that sounds like science fiction: running the full graphical interface of macOS inside Linux — Finder, Dock, Safari and Chrome — with no virtual machine. The trick is loading XNU, the open-source macOS kernel, as a Linux kernel module (xnu.ko) inside an unmodified arm64 Linux kernel. The demo was announced by developer Heyang Zhou on X on Sunday (November 22), and the project reached the Hacker News front page.
How it works
xnulinux builds XNU from Apple's published sources and runs it as a loadable module. The hosted kernel drives the CPU and MMU directly, so macOS processes run natively alongside Linux processes on the same CPUs, with no hypervisor between them. Linux lends XNU memory, timers, files, network and GPU through a small interface module, fki.ko. With a stock Ubuntu kernel, insmod xnu.ko boots a macOS 27 system disk made by Apple's own installer to the desktop, with loginwindow, WindowServer, Dock, Finder, Safari and Chrome.
It differs from Darling, which reimplements macOS APIs on top of Linux, the way Wine does for Windows: here the real kernel runs. And it differs from a VM, because there is no hypervisor — XNU and Linux share the hardware directly.
What already works
According to the project's README, macOS 27.2.1 boots to the desktop with auto-login in 31 to 48 seconds — an Apple Virtualization macOS VM on the same Mac takes 49 seconds. Apps open and quit, Spotlight and the file system work, and a 30-minute stress run — 40 rounds of Safari, Notes, Calculator, TextEdit, System Settings, Spotlight and a disk walk — finished with no kernel panic and no crash report. According to the developer's announcement on X, Finder, Safari, Xcode and Terminal work.
The project already runs in two setups: on an Apple Silicon Mac inside an arm64 Linux VM (with krunkit or tart, 1 to 6 hosted CPUs) and directly on hardware, on an NVIDIA DGX Spark running Ubuntu 24.04.5 LTS. GPU acceleration uses Metal over Vulkan, with a bridge to the Linux renderer (Mesa's Venus driver), falling back to CPU rendering when no GPU is available.
Limits and caveats
There are important caveats. The project only works on arm64 — that is, Apple Silicon (M1 or later) — not on x86_64. You need your own macOS 27 installation: no Apple binaries are in the repository or distributed by it; the system disk, kexts and trust cache come from the user's own installation. The project itself lists the current stopgaps: the OS cryptex is merged into the system volume, AMFI is patched, SIP is relaxed, and memory access is slower than in a native VM (4K pages versus 16K). The code is open source, with per-directory licenses — GPL-2.0-only on the Linux side, APSL-2.0 on the XNU side and BSD-2-Clause-Patent for some kexts.
Image: the hosted macOS 27.2.1 desktop next to a Linux terminal, straight from the hosted system's framebuffer. Screenshot from the xnulinux project / AFK AI, via GitHub.
Sources: xnulinux repository on GitHub (AFK-surf); Phoronix; Hacker News.
Transparency note: this article was produced with the assistance of artificial intelligence, cross-checking public posts on X and sources on the internet, and reviewed before publication. Check the original sources to confirm the information.
Por Muse