There's a new answer to "how do I run macOS apps on Linux," and it skips the VM entirely: xnulinux builds Apple's own XNU kernel from the sources Apple publishes and loads it as a Linux kernel module, xnu.ko, into an unmodified arm64 Linux kernel. macOS processes then run directly alongside Linux processes on the same CPUs, same MMU, no hypervisor in the middle. Phoronix, heise and The Register all picked it up this week, and the repo is AFK-surf/xnulinux on GitHub.
Hypervisors required0the hosted XNU drives the CPU and MMU directly
Kernel modulexnu.kobuilt from Apple's published XNU sources
macOS userspace27current release boots and runs
Hardware floorM1+arm64 Linux with pointer authentication support
How does a second kernel share one machine?
Linux already plays host to personalities — that's what eBPF hooks, binfmt handlers and Landlock are, at different depths. xnulinux goes all the way down: the loaded XNU is not emulated and not virtualized, it schedules macOS tasks on real CPUs while Linux keeps its own scheduler running beside it. The repo docs describe the hosted kernel driving the CPU and MMU directly. Two kernels, one machine, an arbitration layer keeping them honest.
The inversion from the classic solutions is worth a table:
| Approach | What runs where | Cost you pay |
|---|---|---|
| WINE (1993–) | Your app, translated API calls, Linux native kernel | Per-app breakage, no macOS frameworks |
| VM (VirtualBox, UTM) | Whole macOS, virtualized hardware | Full second OS, memory, no shared processes |
| xnulinux (2026) | macOS kernel inside Linux, both native | Research-grade stability, PAC-capable arm64 only |
Why is this legal to build at all?
Because Apple publishes XNU. The kernel at the heart of macOS ships as open source through Apple's OSS distribution site, and has for years — darwin is the part of the stack Apple gives away. What Apple does not give away is the userspace: the frameworks and binaries above the kernel are proprietary, and that's the gray zone worth naming. The kernel is shippable; the story of where the macOS 27 userspace bits come from is the part that stays between you and your lawyer. The project proves the architecture; it doesn't launder the license.
WINE put a translation layer above the kernel. This puts a second kernel below the apps. Same goal, opposite altitude.
The lineage here is long, and the timeline shows why this landing spot makes sense:
- WINE ships: compatibility in user space, one app at a time
- WSL1 ships: syscall translation in the kernel, Linux personality on Windows
- WSL2 ships: a real Linux kernel in a utility VM — personality by virtualization
- xnulinux lands: the personality IS a kernel module, no VM at all
What's the honest counter-take?
This is a research artifact, and its own docs say so. The documented setup runs Linux inside a VM on Apple Silicon, which is deliciously circular — you need a Mac-adjacent box with pointer authentication to host the macOS kernel module in the first place, so the demo lives inside the ecosystem it's escaping. Driver coverage is thin, macOS releases will keep moving, and Apple owes this project nothing, not even stability of the interfaces it publishes. We've seen kernels land in strange homes before — Linux itself runs in a browser now — and the pattern holds: the port is the proof of concept, the maintenance is the product, and the maintenance is the hard part.
The small print worth knowing
- Requires an arm64 Linux kernel with pointer authentication enabled — Apple Silicon M1 or newer in practice
- The documented path builds XNU from Apple's apple-oss-distributions source releases
- macOS processes run alongside Linux processes on the same CPUs; no hypervisor participates
- macOS userspace binaries remain Apple's proprietary code — the open part is the kernel beneath them
Verdict — watch the pattern, not the project. Nobody should route production traffic through this next week. But kernel-as-personality is a genuinely new rung below WSL1 and WSL2, and the first team that needs macOS CI without macOS hardware licensing is going to build on exactly this idea.
Sources:
- GitHub — AFK-surf/xnulinux
- Phoronix — XNU Linux Lets macOS Userspace Processes Run On Linux
- heise — xnulinux loads the macOS kernel into Linux as a module
- The Register — XNU Linux: macOS running under Arm64 Linux
Originally published at mrsn — the dev radar.
Top comments (0)