A project called XNU Linux now lets you boot a full macOS 27.2.1 desktop—including Finder, Dock, Safari and the entire macOS userspace—inside an unmodified arm64 Linux kernel. The trick: it compiles Apple's open-source XNU kernel and loads it as a kernel module (xnu.ko) inside Linux, so macOS processes run natively alongside Linux processes, without a hypervisor or emulator in the middle.
This isn't just a minimal shell or a remote framebuffer. With a stock Ubuntu kernel, you can insmod xnu.ko and boot a real macOS system disk (created with Apple's installer) straight to the login window and desktop. From the macOS Terminal, you can SSH into the Linux host running underneath. The two userspaces run side by side, sharing the same CPUs, memory, and devices, and you can see the macOS desktop rendered directly from the hosted framebuffer—even with GPU acceleration if you have the right hardware.
How XNU Linux bridges macOS and Linux
The core of the project is two kernel modules: xnu.ko (the XNU kernel, built from Apple's sources and patched with a Linux64 machine layer), and fki.ko (the Foreign Kernel Interface). The FKI module lets Linux lend XNU its CPUs, memory, timers, files, network, and GPU. Each hosted macOS CPU is a Linux kernel thread pinned to a real CPU; XNU runs natively on it until it yields to the host for I/O or idle. Memory is managed by XNU inside a physically contiguous block provided by Linux. Devices—including disk, display, keyboard, pointer, network, and GPU—are bridged through kexts and host calls.
GPU support is handled via a Metal-to-Vulkan layer (metal2vulkan) that routes macOS's Metal calls to the Linux host's GPU using the DRM bridge and Mesa's Venus driver. If a GPU isn't available, it falls back to CPU rendering with Mesa's lavapipe.
macOS processes (launchd, WindowServer, Safari...) Linux processes (systemd, sshd...)
───────────────────────────────────────────────── ────────────────────────────────────────────
XNU (source-built, LINUX64 machine layer, kexts) |
↕ linux64 host calls
xnu.ko (loads and runs the kernel collection)
↕ FKI (fki_*)
fki.ko (CPUs, memory, faults, files, network, GPU)
Linux kernel (stock distro kernel)




