macOS userspace on Linux, with XNU running as a kernel module

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

It shows two operating systems' kernels can cooperatively share the same CPUs and memory without a hypervisor, hinting at a new approach to OS compatibility on Linux, though it remains a niche experiment with very narrow working configurations.

Read this as

A new open-source project called xnulinux runs the heart of the macOS operating system (its kernel, called XNU) directly inside Linux, instead of running macOS inside a virtual machine. The macOS programs run alongside normal Linux programs on the same processors, with no virtualization layer slowing things down. This lets an Ubuntu machine boot a real macOS 27 desktop, including Safari, on arm64 hardware. It is a technical demonstration, not something ready for everyday use.

The xnulinux project boots Apple's macOS 27 desktop from a stock Ubuntu arm64 kernel with no hypervisor, potentially removing the performance overhead that virtual-machine approaches like QEMU or Docker-OSX carry. Practically, its value is limited: only two demonstrated arm64 setups, CPU-based graphics fallback, and a requirement to build a macOS system disk from Apple's own installer. It is a research curiosity, not a product or cost-saving option now.

xnulinux compiles XNU from Apple's sources as a loadable module (xnu.ko) inside an unmodified arm64 Linux kernel, with fki.ko providing memory, timers, files, networking and GPU services. Each hosted CPU is a pinned Linux kernel thread; XNU receives one CMA-allocated contiguous memory block and shares the user address space with 4K pages. Devices are supplied as kexts, and Metal runs via a Vulkan bridge using Mesa's Venus driver, falling back to lavapipe on the CPU.

Questions this answers

The article above answers these:

  • Can you run macOS on Linux without a virtual machine?
  • What is the xnulinux project?
  • How does the XNU kernel run as a Linux kernel module?

Read the original

This summary exists to save you time, not to replace the source.

Key terms

xnulinux XNU Linux macOS 27 Ubuntu Metal Vulkan

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading