
A developer just found a way to run macOS as a module inside Linux
- A macOS heart inside Linux
- Two kernels, one computer
- Apps run at full throttle
The story
A macOS heart inside Linux
A developer has successfully loaded Apple's XNU kernel as a standard module inside an unmodified Linux system.
Two kernels, one computer
The project, called xnulinux, builds the open-source parts of macOS and runs them as a loadable module.
Instead of a heavy virtual machine, the macOS kernel drives the CPU directly. Linux acts as the host, lending its memory, files, and network to Apple's software through a small interface.
Apps run at full throttle
Because there is no hypervisor between the systems, macOS apps like Safari and Chrome run natively next to Linux processes.
From Finder to the Dock
- It boots a standard macOS 15.2.1 system disk to the full desktop.
- Users can access the Dock, Finder, and System Settings.
- Testing shows it reaches the desktop in 31 to 48 seconds.
- A 30-minute stress test with apps like Notes and Calculator ran without a single crash.
Graphics bridge for Metal
The system uses a custom bridge to let macOS apps access the Linux host's GPU for hardware acceleration.
Built for Apple Silicon
The project currently targets arm64 hardware, specifically Apple Silicon Macs running Linux.
While impressive, it is still experimental. It requires 16 GB of RAM, with half of that reserved exclusively for the macOS side, and certain security features like System Integrity Protection must be relaxed to work.
A new open-source project called xnulinux has achieved a rare technical feat: running the macOS kernel as a loadable module inside a standard Linux system. Developed by Heyang Zhou, the tool builds Apple’s XNU kernel from its publicly available source code and inserts it into an unmodified arm64 Linux kernel, such as the one used by Ubuntu.
Unlike traditional virtualization, which places a layer of software between the hardware and the guest operating system, xnulinux allows the macOS kernel to drive the CPU and memory management unit directly. This means macOS processes run natively alongside Linux processes on the same machine. Linux serves as the foundation, providing the guest kernel with essential services like timers, networking, and file access.
The setup is powerful enough to boot a full macOS 15 desktop. In demonstrations, the system successfully runs core Apple applications including Safari, Finder, and the Dock. It even includes a "GPU bridge" that translates Apple’s Metal graphics commands into Vulkan calls, allowing macOS apps to utilize the host computer's graphics hardware for smoother performance.

Current tests on Apple Silicon hardware show the system is surprisingly stable. It can boot to a login screen in under 50 seconds and survive 30-minute stress tests involving multiple open applications without a kernel panic. However, it remains a tool for enthusiasts and developers; it requires a specific build environment and significant system resources to function properly.
To stay legally compliant, the project does not distribute any Apple-proprietary binaries. Users must provide their own macOS installation disk images and build the kernel collection themselves. By keeping the Linux-licensed code and the Apple-licensed code separated through a clear interface, the project navigates the complex world of cross-platform kernel development.

Source: GitHub ↗
Photo: Tirza van Dijk tirzavandijk, CC0
Illustration: AI-generated






Comments