<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt" -->

---
title: XNU Linux: Full OS X GUI Userspace on Linux | daily.dev
description: xnulinux loads Apple's open-source XNU kernel as a module inside an unmodified arm64 Linux kernel, letting macOS processes run natively alongside Linux ones on...
canonical: https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: XNU Linux: Full OS X GUI Userspace on Linux | daily.dev
og:description: xnulinux loads Apple's open-source XNU kernel as a module inside an unmodified arm64 Linux kernel, letting macOS processes run natively alongside Linux ones on...
og:url: https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt
og:image: https://api.daily.dev/og/posts/f3euWvzGT.png
og:image:alt: XNU Linux: Full OS X GUI Userspace on Linux
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# XNU Linux: Full OS X GUI Userspace on Linux

**[Hacker News](https://daily.dev/sources/hn)** · 7 min read · 3 upvotes · 2 comments

## Summary

xnulinux loads Apple's open-source XNU kernel as a module inside an unmodified arm64 Linux kernel, letting macOS processes run natively alongside Linux ones on the same CPUs with no hypervisor. A small GPL module, fki.ko, gives XNU access to Linux's memory, timers, files, network and GPU. On a stock Ubuntu kernel, running insmod xnu.ko boots a macOS 27 disk made by Apple's installer all the way to the desktop, including Safari and Chrome. On an Apple Silicon Mac running an arm64 Linux VM, macOS 27.2.1 boots with auto-login in 31 to 48 seconds, close to the 49 seconds an Apple Virtualization VM takes. A 30-minute stress run across Safari, Notes, Calculator and more finished with no panic or crash report. Memory access is slower than a native VM because it uses 4K pages instead of 16K.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/AFK-surf/xnulinux>

## Questions this post answers

### Can you run the macOS XNU kernel as a loadable module inside a Linux kernel on arm64?

Yes, a project called xnulinux builds XNU from Apple's published sources and loads it as a kernel module (xnu.ko) inside an unmodified arm64 Linux kernel. A GPL interface module, fki.ko, gives XNU access to Linux's memory, timers, files, network and GPU, letting macOS processes run natively alongside Linux processes with no hypervisor.

_Developers exploring kernel internals and virtualization tricks can follow projects like this on daily.dev._

### How fast does macOS boot when hosted inside Linux via xnu.ko compared to a normal virtual machine?

On an Apple Silicon Mac running an arm64 Linux VM, macOS 27.2.1 boots to the desktop with auto-login in 31 to 48 seconds via xnu.ko, compared to 49 seconds for an Apple Virtualization macOS VM on the same Mac. The setup ran a 30-minute stress test across Safari, Notes, Calculator, TextEdit and Spotlight with no panic or crash report.

_Anyone comparing boot performance across virtualization approaches can track benchmarks like this on daily.dev._

### How does GPU acceleration work for a macOS system running inside a Linux host without a hypervisor?

Metal calls in the hosted macOS run through metal2vulkan over Vulkan, and Vulkan reaches the Linux host's GPU through a DRM bridge (a kext called XnuDrm talking to xnudrmd) using Mesa's Venus driver. Without a GPU, it falls back to Mesa lavapipe running on the CPU instead.

_Engineers wiring GPU passthrough between hosted and host kernels can track approaches like this on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 67 comments across hackernews (as of 2026-11-24).

**TL;DR:** The project is seen as a genuinely impressive technical hack, with discussion split between admiration for the engineering and debate over why anyone would want it, whether it needs Apple hardware, and how Apple might react legally.

**Sentiment:** 35% positive · 40% mixed · 25% skeptical

**The case for**

- Seen as a remarkable technical achievement that would have seemed impossible a few years ago.
- Could be useful for cross-platform Mac/iOS development and testing on a Linux host.
- Potentially valuable for Asahi Linux users wanting a macOS environment alongside Linux.
- Built largely on Apple's own open-sourced XNU code rather than reverse-engineered material, which some see as lowering legal risk.

**The pushback**

- Still requires actual Apple Silicon hardware, undercutting the dream of macOS on arbitrary hardware.
- Relies on PAC and the vmapple kernel, raising doubts about portability to non-Apple ARM chips.
- Possible EULA/legal exposure, especially if used for things like commercial Xcode build farms.
- Some question the practical motivation, suggesting it's mostly 'because it's cool' rather than solving a real need.

**By community**

- hackernews (mixed): Reactions range from awe at the engineering feat to skepticism about its purpose, hardware requirements, and Apple's possible legal response.

**Hottest debate:** Whether this project can ever escape the need for actual Apple Silicon hardware, versus it being fundamentally tied to Apple's kernel and PAC architecture.

**Open questions**

- Can Xcode or iOS app builds actually be run on this setup in practice?
- Will Apple take any legal or technical action against projects like this?
- Could the Apple-hardware dependency eventually be removed by replacing Apple-specific parts with generic aarch64 equivalents?

**Highlights**

> I came to write the same comment. I used to think that the dominance of U.S. is mostly because no other country has the capacity to develop operating systems and the world depends on a few OSes that are entirely developed there. Linux was never winning, windows was shit, but OS X and iOS, they were at one side undeniably high quality, and on the other side impossible to copy. So I always thought "How can China win over US without an operating system". Apple had made it such that all Hackintoish efforts were blocked for some many years, and iOS was impossible to boot anywhere but inside of an Apple device. Fast forward to now, and I have an amazing app sitting on my computer called "Light Touch" that allows me to install and emulate any version of iOS on my computer, proxity its network, install whatever IPA app I wish on it, and I can't believe. And this one, I thought you must be joking. Imagine all the decades long efforts by GNU to clone Objective-C, Foundation, Cocoa... and they still can't even run NeXTSTEP software on GNUStep and GWorkspace. Then you wake up and see not one of teh libraries, not the bare XNU, but the whole fucking mac being running inside of Linux... I mean What the literal fuck. Mac had this god-like image in my head as something made by who knows how many tens of thousands of world's highest of highest engineers and designers. You could see that no app outside of the Apple entering its app store could have the quality of design and harmony that Apple's own apps had. (I mean imagine one app outside of Apple in the days of iOS 4 or Leopard to have that quality of icons for example), then Apple with Ive lowered the bar to entry and all the other apps cached up and most even got way better than Apple, but that was still a different era and a different game. But look at the past few years. Apple introduced Liquid Glass---which to me was a way to say "hey flat designers making cross-platfrom stuff in Figma, you no longer will be able, I want to introdue a UI component so complicated that you can't bring it to Android", but then a matter of days liquid glass was everywhere. Figma and Sketch easily added it to their components, Flutter had it, everyone had it... I made my own in an afternoon. The iPhone Duo animation was perhaps 50% of its selling point and by the night you could have it on samsung as well as on a Mac... This is insane, and it must be really a stupid thing to say, but to me Apple was something of the Da Vinci of my era. I could see all people trying to get to its quality and looks and everything but no one could, they always were ten times ahead of anyone and it was exciting to be sitting waiting to see what new thing they're going to show in the WWDC. Now that godness is being killed for me, and it is painful to watch.
> — [pmkary on hackernews · 3 comments](https://news.ycombinator.com/item?id=50607902)

> I think you might be surprised to learn how much of this came from open source code: > xnulinux builds XNU, the open-source kernel of macOS, from Apple's published sources EDIT: XNU sources, for those who are unaware that the XNU kernel is open source: https://github.com/apple-oss-distributions/xnu
> — [Aurornis on hackernews](https://news.ycombinator.com/item?id=50608083)

> This project loads the (lightly modified) actual macOS kernel into memory (as a sort of co-kernel with Linux), so it would almost certainly not work on any hardware the original kernel doesn't run on.
> — [valleyer on hackernews · 3 comments](https://news.ycombinator.com/item?id=50608005)

> But macOS has several arbitrary limitations that Linux and Linux-compatible hardware doesn't. Apple has dug this grave for themselves by removing dGPU/eGPU support, refusing to implement Vulkan, and not signing CUDA drivers. As long as Apple makes boneheaded decisions like that, people will go to boneheaded lengths to work around it.
> — [bigyabai on hackernews · 1 comments](https://news.ycombinator.com/item?id=50607779)

> PAC is a standard Armv8.3 extension and has been implemented in a lot of processors outside of the Apple ecosystem [1]. Lots of PAC instructions use HINT space encodings, which makes them NOPs on unsupported processors, and those that don't will just trap into the kernel, making it possible to simply skip or emulate them. A great deal of AArch64 Linux distros already builds binary packages exclusively with PAC, and those continue to run on SoCs that lack support, like that of the Raspberry Pi. [1] https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.ht...
> — [m132 on hackernews](https://news.ycombinator.com/item?id=50608144)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50607261) · 144 points · 67 comments

## Community discussion

Top comments from developers on daily.dev.

**@pkraszewski** · 0 upvotes

> Apple lawyers already started igniting fires under their cauldrons with tar and hot oil. Also, sharks haven't been fed for a while.

**@petecapecod** · 0 upvotes

> Holy crap someone actually did it!
>
> I knew at some point this was going to happen, we have the resources now where 1 person could do it.
>
> I'm going to have to try firing this thing up

## Similar posts on daily.dev

- [Show HN: Run full iOS 16.5 firmware on Android Devices](https://daily.dev/posts/show-hn-run-full-ios-16-5-firmware-on-android-devices-1xbviab3j) · Hacker News · 0 upvotes · 0 comments
- [Someone actually got macOS 27 running on a Snapdragon X2 Elite, and it works surprisingly well](https://daily.dev/posts/someone-actually-got-macos-27-running-on-a-snapdragon-x2-elite-and-it-works-surprisingly-well-jtfw9hutu) · XDA Developers · 1 upvotes · 0 comments
- [Apple M3 Booting On Linux After Three Years Plus Other SoC Updates In Linux 7.2](https://daily.dev/posts/apple-m3-booting-on-linux-after-three-years-plus-other-soc-updates-in-linux-7-2-kuu7wpalj) · Phoronix · 0 upvotes · 0 comments
- [Android apps running native on macOS](https://daily.dev/posts/android-apps-running-native-on-macos-gcspqvspy) · Hacker News · 3 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#mac](https://daily.dev/tags/mac), [#objective-c](https://daily.dev/tags/objective-c)

[View this post on daily.dev](https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"XNU Linux: Full OS X GUI Userspace on Linux","url":"https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt"},"datePublished":"2026-11-23T05:17:03.993Z","dateModified":"2026-11-24T00:44:50.376Z","description":"xnulinux loads Apple's open-source XNU kernel as a module inside an unmodified arm64 Linux kernel, letting macOS processes run natively alongside Linux ones on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8c7ac3db9ea1c333ba5bf950c905ddbe?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8c7ac3db9ea1c333ba5bf950c905ddbe?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"linux,mac,objective-c","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"XNU Linux: Full OS X GUI Userspace on Linux"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt","comment":[{"@type":"Comment","text":"Apple lawyers already started igniting fires under their cauldrons with tar and hot oil. Also, sharks haven’t been fed for a while.","datePublished":"2026-11-23T05:34:08.229Z","url":"https://daily.dev/posts/f3euWvzGT#c-EX2imGvX7","author":{"@type":"Person","name":"Paweł Kraszewski","url":"https://daily.dev/pkraszewski","image":"https://avatars.githubusercontent.com/u/1206223?v=4"}},{"@type":"Comment","text":"Holy crap someone actually did it!\nI knew at some point this was going to happen, we have the resources now where 1 person could do it.\nI’m going to have to try firing this thing up","datePublished":"2026-11-23T14:15:57.156Z","url":"https://daily.dev/posts/f3euWvzGT#c-YhmfDXzNN","author":{"@type":"Person","name":"Peter Cruckshank","url":"https://daily.dev/petecapecod","image":"https://media.daily.dev/image/upload/s--ZJhQyKws--/f_auto/v1721235024/avatars/avatar_A9xh33q0QoxtkGoJRCosp"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/xnu-linux-full-os-x-gui-userspace-on-linux-f3euwvzgt#faq","mainEntity":[{"@type":"Question","name":"Can you run the macOS XNU kernel as a loadable module inside a Linux kernel on arm64?","acceptedAnswer":{"@type":"Answer","text":"Yes, a project called xnulinux builds XNU from Apple's published sources and loads it as a kernel module (xnu.ko) inside an unmodified arm64 Linux kernel. A GPL interface module, fki.ko, gives XNU access to Linux's memory, timers, files, network and GPU, letting macOS processes run natively alongside Linux processes with no hypervisor. Developers exploring kernel internals and virtualization tricks can follow projects like this on daily.dev."}},{"@type":"Question","name":"How fast does macOS boot when hosted inside Linux via xnu.ko compared to a normal virtual machine?","acceptedAnswer":{"@type":"Answer","text":"On an Apple Silicon Mac running an arm64 Linux VM, macOS 27.2.1 boots to the desktop with auto-login in 31 to 48 seconds via xnu.ko, compared to 49 seconds for an Apple Virtualization macOS VM on the same Mac. The setup ran a 30-minute stress test across Safari, Notes, Calculator, TextEdit and Spotlight with no panic or crash report. Anyone comparing boot performance across virtualization approaches can track benchmarks like this on daily.dev."}},{"@type":"Question","name":"How does GPU acceleration work for a macOS system running inside a Linux host without a hypervisor?","acceptedAnswer":{"@type":"Answer","text":"Metal calls in the hosted macOS run through metal2vulkan over Vulkan, and Vulkan reaches the Linux host's GPU through a DRM bridge (a kext called XnuDrm talking to xnudrmd) using Mesa's Venus driver. Without a GPU, it falls back to Mesa lavapipe running on the CPU instead. Engineers wiring GPU passthrough between hosted and host kernels can track approaches like this on daily.dev."}}]}
```

