XNULinux can run macOS apps in Linux without a virtual machine

XNULinux can run macOS apps in Linux without a virtual machine

The XNULinux project is able to run macOS 27 and macOS apps on a Linux PC, all without requiring any virtualization. It's still not bootable, though.

Most Linux projects AppleInsider writes about involve trying to run Linux on a Mac. However, there's now a project that is running macOS on Linux.

Outside of building a Hackintosh, the usual way to run a macOS app on Linux or non-Apple hardware is through a virtual machine. However, that often introduces performance overheads that can impact the overall experience.

The XNULinux project sidesteps that issue by being able to run macOS 27 itself, without needing modifications. Since macOS can run, apps running within macOS 27 can also run on the Linux computer.

So far, it can run macOS 27.2.1, complete with a working desktop and Dock, and can run various apps including Spotlight, Safari, Notes, and Calculator.

Kernels in kernels

The project works by loading the macOS kernel into the Linux kernel, so that macOS runs directly within Linux. It uses XNU, the open-source kernel used for macOS published by Apple, and inserts it as a loadable kernel module within an unmodified arm64 Linux kernel.

That hosted XNU kernel is able to run the CPU and memory management unit (MMU) directly. In effect, macOS processes can run natively alongside Linux processes through the same CPU without any hypervisor.

XNU gets memory, timers, files, network, and GPU access from Linux via a small interface module.

As it stands, the project is in its early days, and has been tested on a few hardware configurations. This has included an Nvidia DGX Spark running on bare metal.

Mac desktop with rocky beach wallpaper, two dark terminal windows open side by side showing network commands and outputs, and a colorful application dock along the bottom

A Terminal screen accessing macOS normally [left], and a Terminal with an SSH session into the Linux version that macOS is running inside [right], running on an Nvidia DGX Spark - Image Credit: XNULinux

A second setup has been running on an arm64 Linux virtual machine on an Apple Silicon Mac. This is effectively macOS running on a Linux in a virtual machine running on a Mac.

However, at this time, it doesn't appear that the project has managed to get the Linux element running on the Mac hardware directly.

The current requirements include an arm64 Linux host with at least 16GB of memory. A Mac is required for access to Xcode, for the creation of the system disk and to build GPU parts of the software.

It also needs a macOS installation supplied by the user, since the project does not distribute Apple's binaries.

Operating system projects

XNULinux is an unusual project, and it is the latest in a series of similar operating system projects using Apple's hardware and software in different ways.

One long-running project is Asahi Linux, which is working to get Linux running natively on Apple Silicon Macs. On October 4, there were the first signs of basic M4 chip support for the project.

More recently, on November 18, SiliconForest OS surfaced as a combination of XNU and Apple's Darwin, the Unix-like core that Apple uses in its operating systems. That project has the similar aim of natively running Mac apps.

However, unlike XNULinux, SiliconForest has been run on Apple's hardware, albeit only on an M1 13-inch MacBook Pro.


Source: Read original article