Skip to content

Unkernel boots a real Linux kernel in a browser tab

Unkernel compiles the real Linux kernel to WebAssembly: a shell, package manager and network in a browser tab, booting in under a second, with the kernel native and only the user programs emulated.

A miniature model of a complete computer room built inside a laptop screen frame: a small brass server rack, a tiny terminal on a desk, and a coiled red cable, against a deep blue background
A miniature computer room built inside a laptop screen, with a brass server rack, a tiny terminal and a red cable on a deep blue ground.
On this page

In brief

  • Unkernel compiles the real Linux kernel (7.3.4 plus patches) to a single WebAssembly module, with a real MMU, so a shell, package manager and network boot in a browser tab in under a second.
  • The kernel runs as compiled wasm; only unmodified aarch64 user programs are emulated, on kwemu, a CPU emulator written in Zig and linked into the kernel.
  • The project's own benchmarks, measured under Node on November 14, put fork plus exit plus wait at 57 microseconds, against 73 natively and 1,178 under QEMU.
  • Alpine Linux 3.24 and Debian 13 boot on the page, Ubuntu 26.10 boots systemd, and the newest release adds guest Vulkan on WebGPU with local models inside the guest.
  • It needs a recent browser with JSPI support: Chrome or Edge 137+, Firefox 153+, or Safari 27+. There is no IPv6, no inbound connections, and no hardware breakpoint support.

Open a web page and a Linux prompt appears. No installer, no virtual machine, no server on the other end. The page downloads about 10 MB, and a shell is waiting in under a second. That is unkernel, a project that compiled the real Linux kernel to WebAssembly, and it reached the front page of Hacker News overnight, sixteen days after the repository appeared.

The trick is a split that runs the other way from every earlier attempt. In most "Linux in the browser" projects, every part of the machine is emulated, kernel included, which makes every syscall and page fault pass through emulated hardware. Unkernel compiles the kernel itself to WebAssembly and emulates only the user programs. The kernel's syscalls, scheduler, memory management, ext4 and TCP/IP stack run as compiled wasm code, while unmodified aarch64 binaries run on kwemu, a small CPU emulator written in Zig and linked into the kernel. That is why the project can claim the behavior is Linux's own down to the edge cases: the code answering a syscall is Linux's own code.

The part that makes it work is the memory management unit. Unkernel's port, arch/wasm, uses real Sv48 page tables, so fork, mmap, copy-on-write, shared memory, threads and signals behave as they do on hardware. Earlier wasm ports of Linux had no MMU, which meant programs were limited to vfork and anything that needed real memory mapping broke or was approximated. Task switches use JSPI, the WebAssembly feature that lets wasm code pause while it waits and continue later, so the kernel gets real stacks it can suspend and resume. The browser support follows from that requirement: Chrome and Edge 137 or newer, Firefox 153 or newer, and Safari 27 or newer.

What you get on the page is a complete machine. Alpine Linux 3.24 and Debian 13 both boot there, and the page is a desktop with a dock, windows, and a terminal. There is a package manager, a persistent disk that survives a reload, internet access, a framebuffer, sound, and even guest graphics: the newest release gives the guest a Vulkan driver that runs on the browser's WebGPU, and local models run inside it through llama.cpp and Ollama. The project's own notes say Ubuntu 26.10 boots systemd to its multi-user target. From a terminal it is simpler still: npx unkernel boots Alpine, with flags for Debian, mounted directories, and port forwarding to a server inside the guest.

The numbers, and whose they are

The figures come from the project's README, measured under Node on November 14 and 18. They are the project's own numbers; no independent test exists yet. On that basis they are startling. A getppid syscall takes 172 nanoseconds on unkernel against 110 natively and 1,662 under QEMU's full-system emulation. Fork, exit and wait take 57 microseconds, against 73 natively and 1,178 under QEMU: in this test, fork is faster than on bare metal, because the kernel path runs as compiled wasm while the comparison machine pays the cost of a real context switch. A 64-byte read takes 172 nanoseconds, near the native 161. A JIT compiles hot aarch64 code to wasm while it runs, making a shell loop 1.6 times and sort 2.3 times as fast as the interpreter alone, with OpenSSL reaching about 100 MB/s on AES-128-GCM and 160 MB/s on SHA-256.

Bar chart, log scale, of time per operation for native Linux, QEMU and unkernel across getppid, a 64-byte read, pipe write plus read, and fork plus exit plus wait
The project's benchmark numbers on a log scale. Fork plus exit plus wait is the surprise: 57 microseconds on unkernel, faster than the 73 measured natively. Data from the unkernel README, November 14, 2026. Source.

The same measurements show where it falls behind. Pure computation runs well behind native: the interpreter manages about 250 to 300 million guest instructions per second, and everyday package work is slow, with apk search over the main index taking about 0.8 seconds and apk add python3 about 3.4. Code that runs only a few times stays on the interpreter, and floating point goes through it too unless the host engine has wasm SIMD. A sixteen-day-old project with benchmarks measured by its own author is a claim to check, and the honest read is that the kernel path is fast and the user programs are the slow part, which is the opposite of the usual emulator.

What it is not

The kernel is not emulated, and that sentence matters because the usual picture of Linux in a browser is a PC reproduced in software, part for part. The project draws the contrast itself: whole-machine emulators reproduce the hardware, syscall reimplementers rebuild the kernel's interface in a runtime, and wasm POSIX runtimes need programs rebuilt for wasm. Unkernel takes a fourth path, and the closest thing grep.tips has covered is the opposite end of it: DOSBox-X, which emulates the entire pre-2000 PC, hardware and all, so that old software runs exactly as it did. Unkernel keeps the kernel and throws away the machine.

The limits are stated on the same page as the promises. There is no IPv6 and no inbound network connections, so nothing outside can reach a server in the guest. There is no hardware breakpoint support, so gdb's watchpoints fall back to software ones that single-step the program. A wasm trap in the kernel ends the session. Browsers cannot open raw TCP sockets, so the page reaches the internet through a Wisp proxy, and names resolve to placeholder addresses, with a bad name failing only at connect time.

Try it

Unkernel is by Pooya Parsa, who publishes as pi0, sponsored by Vercel's open-source program, and the code credits the Kernarium idea and the linux-wasm port it grew from. The repository appeared on November 12 and already has 2,805 stars and 16 releases; the npm package, published as unkernel, is at a version tagged November 27. The kernel is GPL-2.0-or-later and the JavaScript SDK is MIT, so the embeddable part can ship in a product.

The page to open is unkernel.dev, and the terminal version is one command: npx unkernel. The browser needs to be recent enough for JSPI, and the page will say what is missing if it is not. What is worth watching next is whether the numbers hold up outside the author's machine, and whether anyone builds something on the SDK that a plain emulator could not do. Sixteen days in, the interesting fact is narrower than the headline: the kernel was the hard part to fake, and it turns out it was never faked at all.

Related reporting

More from grep.tips

All articles