🐧 unkernel: a real Linux kernel compiled to WebAssembly boots in a browser in under a second
In brief
- 🐧 unkernel compiles Linux 7.x into a single WebAssembly module that boots to a shell in a browser tab.
- ⚡ According to the project the Alpine prompt appears after about 0.3 seconds; the page downloads about 10 MB.
- 📦 Alpine and Debian run with their normal packages, and changes are saved in the browser.
- 🔓 Open source: kernel under GPL-2.0-or-later, SDK and page under MIT; try it at unkernel.dev or with npx unkernel.
🐧 The open-source project [unkernel](https://github.com/pithings/unkernel) puts a complete Linux machine in the browser, with no server and nothing to install. Unlike most browser Linux projects it does not emulate a whole PC: the Linux 7.x kernel itself is compiled to WebAssembly, so system calls, the scheduler, memory management, ext4 and TCP/IP run as real kernel code. Only user programs are emulated, and they are unmodified arm64 binaries, so Alpine and Debian packages run as they are. ⚡ According to the project, the kernel reaches its first process about 70 milliseconds after it starts, the page downloads about 10 MB, and Alpine boots in 48 MiB of guest memory. Opening [unkernel.dev](https://unkernel.dev) gives you a desktop with a terminal; changes to the system are stored in the browser and survive a reload. Developers can run the same kernel from the command line (npx unkernel) or build it into their own apps with a TypeScript SDK. 🧰 It suits anyone who needs a real Linux environment quickly, for learning, demos or isolated test setups. CPU-heavy programs run well behind real hardware, though, and the browser needs a newer WebAssembly feature (JSPI). The project is made by Pooya Parsa and sponsored by Vercel.
🔧 How it works. User programs run on kwemu, an arm64 processor written in Zig and linked into the kernel. kwemu walks the kernel's own page tables, so memory management is done by the real Linux code. When a program makes a system call, kwemu returns to the kernel, which handles it as ordinary WebAssembly; there is no emulated kernel mode in between. To switch between tasks the project uses JSPI (WebAssembly.Suspending), which lets the kernel suspend and resume real stacks. Frequently run code is also compiled to WebAssembly while it runs; the README says a shell loop then runs 1.6 times and sort 2.3 times as fast as on the interpreter alone.
📊 The project's numbers. A simple system call (getppid) takes about 170 nanoseconds in measurements from 14 November, against 110 natively and 1.7 microseconds under qemu-system. fork with exit and wait takes about 60 microseconds, against about 70 natively. The project names its own limits: pure computation is far behind native speed; searching the Alpine package index takes about 0.8 seconds and installing Python about 3.4 seconds.
🖥️ What runs in the browser. Alpine Linux 3.24 runs in Chrome, Edge, Firefox and Safari, and according to the project on phones too. Packages come through apk from the regular Alpine mirrors; a missing command such as htop is installed automatically the first time you type it. Debian 13 boots the same way, with apt. Node, npm, Python, OpenSSL and curl run straight from the distribution. There is also a screen, keyboard, mouse, sound and, on Debian, graphics acceleration that draws through the browser's WebGL2. The project lists cgroups, namespaces and other kernel features that it says are enough to boot Ubuntu 26.10 with systemd.
🌐 Network and limits. Because browsers cannot open raw TCP sockets, internet access goes through a Wisp proxy. The README points out that this proxy sees addresses and traffic; encrypted HTTPS streams stay opaque to it, plain ones do not. Anyone hosting the page can point it at their own proxy. There is no IPv6, hardly any UDP and no inbound connections. The default wallpaper fetches a random photo from an outside service on every load, which can be switched off in the settings. A crash inside the WebAssembly kernel ends the session.
🧑💻 For developers. The TypeScript SDK has no dependencies and runs in Node and in the browser, optionally in a worker. It starts programs, opens terminal sessions, mounts host directories and exchanges data over vsock or shared memory. The command line can type input on a schedule, which makes it usable for automated tests. Building it yourself needs Linux, Zig 0.16, Node 24 and clang 21; the project says the first build takes about twelve minutes.
📜 Origins and licence. unkernel grew from Joel Severin's arch/wasm port (linux-wasm) and credits Kernarium, iSH and v86 as models. The kernel is GPL-2.0-or-later, the SDK and the page are MIT, so they can also be built into commercial products.