# unkernel

> A real Linux kernel compiled to WebAssembly that boots to a shell in the browser or Node in under a second.

unkernel is an open-source project by Pooya Parsa (pi0) that compiles Linux 7.x into a single WebAssembly module with a real MMU. It runs unmodified aarch64 Linux binaries, so Alpine and Debian packages work as they are, in a browser tab, from the terminal with `npx unkernel`, or from a JavaScript SDK. The project documents a browser desktop at unkernel.dev, and the latest release listed is v0.2.0-261127-3b71fa5.

## What It Is

unkernel is a Linux-in-the-browser runtime. The kernel itself (syscalls, scheduler, memory management, ext4, TCP/IP) is compiled to wasm rather than emulated. Only user programs are emulated, on kwemu, an aarch64 CPU written in Zig and linked into the kernel. Opening the page gives a Linux machine with a shell, a package manager, a persistent disk, internet access, and a screen with sound. It runs on the user's device with no server.

## How It Works

kwemu walks the kernel's own page tables, so memory management is done by the real Linux code. A syscall returns from kwemu to the kernel, which handles it as native wasm, and task switches use JSPI. Hot user code goes through a JIT that compiles blocks to wasm. Devices are small paravirtual drivers (block, network, display, input, sound, vsock, shared memory) that talk to the JavaScript host. The project says it uses real file systems (ext4, overlayfs, tmpfs, FUSE, 9p), cgroups and namespaces, and Linux's own TCP/IP stack, reaching the internet through host sockets or a Wisp proxy.

## Ways to Use It

- Browser desktop with terminal windows, an app launcher, Wayland apps, settings for CPUs, memory, distro, disk and network, and Alpine or Debian images.
- CLI: `npx unkernel` boots Alpine, with options for Debian, a persistent data disk, directory mounts, port forwarding, display and sound, and scripted input with exit codes.
- Zero-dependency TypeScript SDK (`npm install unkernel`) for Node and browsers, with exec and spawn, pty sessions, disks, mounts, vsock, shared memory, display and sound, and guest GL and Vulkan.

## Requirements and Known Limits

unkernel needs JSPI: Node 24+, Chrome/Edge 137+, Firefox 153+, or Safari 27+. The README lists limits including no IPv6, no UDP beyond DHCP and DNS, no inbound network connections, and CPU-heavy programs running well behind native. The project is GPL-2.0-or-later, with the JavaScript SDK and page under MIT.

## Features
- Real Linux 7.x kernel compiled to WebAssembly with a real MMU
- Runs unmodified aarch64 Alpine and Debian binaries
- JIT compiling hot aarch64 user code to wasm
- Persistent ext4 data disk saved in the browser
- Internet access via host sockets or Wisp proxy
- Framebuffer display, input devices and ALSA sound
- Guest GL via virgl on WebGL2 and Vulkan via WebGPU
- Wayland app windows through wland
- Multi-CPU SMP kernel using Web Workers
- CLI with disk, mount, port-forward and scripted input options
- Zero-dependency TypeScript SDK for Node and browsers
- Host directory mounts over 9p, vsock streams and shared memory

## Integrations
Alpine Linux, Debian, Wisp, WebGL2, WebGPU, Node.js, Wayland, npm

## Platforms
WINDOWS, MACOS, LINUX, ANDROID, IOS, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.2.0-261127-3b71fa5

## Links
- Website: https://unkernel.dev
- Documentation: https://docs.unkernel.dev/
- Repository: https://github.com/pithings/unkernel
- EveryDev.ai: https://www.everydev.ai/tools/unkernel
