unkernel

unkernel

Real Linux kernel in the browser

Description

When you just need a Linux box to try a command or install a package, it's either a VM you have to wait for or a server somewhere. Browser emulators that do exist are usually a cut-down shell.

unkernel is Linux 7.x built as a single WebAssembly module with a real MMU. Syscalls, the scheduler, memory management, ext4 and TCP/IP are compiled kernel code, not emulation; only user programs, unmodified arm64 binaries, are emulated, so Alpine and Debian packages run as they are. Open the page and you're at a shell in under a second, with a package manager, a persistent disk, internet access and a screen with sound.

It all runs on your own device, with nothing to install and no server, and every layer is open source (GPL-2.0).

Features



A real kernel: fork, mmap, copy-on-write, shared memory, threads and signals behave as on hardware; /proc, epoll, cgroups and overlayfs behave as on a server.

Fast boot: the kernel reaches /init in about 70 ms and the Alpine prompt appears 0.3 s after node starts; the page downloads about 10 MB.

Near-native syscalls: getppid takes about 170 ns and fork + exit + wait about 60 µs, an order of magnitude ahead of qemu-system.

JIT for user code: hot arm64 code is compiled to wasm as it runs; OpenSSL inside does AES-128-GCM at about 100 MB/s.

Terminal too: npx unkernel boots it from one command, with options for Debian, mounting host folders, port forwarding, display and sound, and scripted input.

JavaScript SDK: npm install unkernel to embed a Linux machine in your own page or Node program.

Persistent disk: the root is a read-only distro image under an ext4 overlay, so what you install is still there next time.