December 25, 2025
Penguin powered by JS
Ultimate-Linux: Userspace for Linux in Pure JavaScript
JavaScript boots Linux’s brain—half the internet cheers, half screams
TLDR: A tiny Linux shell built in JavaScript boots as the first program in a virtual machine, proving Linux’s flexibility. Comments explode: jokes about a JS takeover, purists demand direct kernel calls without libraries, and veterans cite Bellard’s jslinux—sparking a fun, fiery debate about how software should talk to the OS.
A developer just launched a tiny Linux shell written in pure JavaScript—yes, JavaScript—compiled with QuickJS and a dash of C, then booted it as the very first program inside a virtual machine. Commands like ls, cd, and cat are there, and the internet immediately split into camps. One side is chanting “JS everywhere!” as users joke about the coming JavaScript takeover, while the other side clutches pearls at the idea of Linux userspace without the usual C library comfort blanket.
The loudest hot take? A purist crowd insisting it should skip the standard system library (aka “libc,” the common toolkit programs use to talk to the operating system) and go straight to kernel syscalls—like plugging directly into the engine. Others waved receipts: links to Fabrice Bellard’s jslinux, the OG browser-based Linux, and a throwback to the viral talk The Birth and Death of JavaScript, with one commenter quipping we’re “on schedule.” Meanwhile, a curious reader poked at a simple but spicy question: if the cd command taps the operating system, where does a “current directory” really live? Answer: the OS tracks it per program—cue more debate. Between memes, purism, and real questions, this thread has everything: chaos, nostalgia, and a penguin powered by JS.
Key Points
- •A minimal Linux userspace and shell is implemented in JavaScript with a small amount of C.
- •Linux’s stable syscall ABI is contrasted with macOS’s system-library contract and BSD’s bundling of kernel and userspace.
- •QuickJS is used to transpile JavaScript to C; the result is statically linked with musl to produce a standalone ELF binary.
- •Build steps include installing musl, using musl-gcc, and linking against libquickjs along with standard libraries.
- •The shell is demonstrated as PID 1 in a QEMU VM via an initramfs created with cpio and a Linux 6.17.12 bzImage.