Anime, manga, and games, with a take · A Yukimedia publication

xnulinux Runs macOS User Space on Linux via XNU Kernel Module

The open-source project xnulinux runs the macOS GUI user space on Linux by loading XNU, Apple's open-source macOS kernel, as a Linux kernel module called xnu.ko.

Reporting from 1 source: GIGAZINE.

Why it matters

Running Apple's own kernel as a loadable module inside Linux, rather than emulating macOS, gives the project a working desktop on arm64 Linux hosts, though it still depends on Apple's installer for the system disk and kexts.

xnulinux Runs macOS User Space on Linux via XNU Kernel Module

Key Facts

  • xnulinux loads XNU, the open-source macOS kernel, into Linux as a loadable kernel module named xnu.ko.
  • On a standard Ubuntu kernel, insmod xnu.ko boots a macOS 27 system disk created with Apple's installer to the desktop.
  • The login window, WindowServer, Dock, Finder, Safari, and Chrome can be launched from the hosted macOS desktop.
  • xnulinux has been confirmed in an arm64 Linux VM on an Apple Silicon Mac and on bare-metal arm64 Linux on an NVIDIA DGX Spark.
  • The project repository contains no Apple binaries; the macOS system disk and kernel extensions must be obtained from Apple's installer or IPSW.

On a standard Ubuntu kernel, insmod xnu.ko boots a macOS 27 system disk made with Apple's installer to the desktop, where the login window, WindowServer, Dock, Finder, Safari, and Chrome launch. It has been confirmed in an arm64 Linux VM on Apple Silicon and on bare-metal arm64 Linux on an NVIDIA DGX Spark.

The host Linux supplies CPU, memory, files, network, and GPU to XNU through a second module, fki.ko, a Foreign Kernel Interface. Each host CPU becomes a Linux kernel thread tied to a specific CPU, and XNU allocates contiguous memory from Linux's CMA while managing it with its own pmap.

Metal runs through gpu/xnu-cpu-metal, described as Metal2Vulkan on top of Vulkan, with Vulkan reaching the host GPU through a DRM bridge; without a supported backend it falls back to CPU rendering via Mesa lavapipe. The repository holds no Apple binaries, and the macOS system disk and kernel extensions must come from Apple's installer or IPSW.

Written with AI by Yomimono from the 1 cited source below, including Japanese-language reporting where cited. See our editorial policy.

Add Yomimono as a preferred source on Google

xnulinux

Sources