A Debian Trixie 13 simulator, JSBian, made in JavaScript — a persistent,
Debian-compatible environment that runs entirely in Node.js. No VM, no
kernel, no CPU emulation: the shell, filesystem, package manager, init
system, and users are all implemented directly in JS, with real apt
metadata behind them where it matters.
Mostly a PoC. Most "Linux in JS" projects (JSLinux and friends) either
emulate real hardware to boot an actual Linux kernel as a VM, or don't
really emulate anything at all. JSBian tries a third path: be honestly a
simulation — a real, persistent filesystem and package database, real
Debian package metadata, but no pretense of running native machine code.
Where that limit actually matters (you want something to run, not just
be listed by apt), packages can be real, sandboxed JavaScript instead of
unexecutable ELF binaries.
node jsbian-installer.js # first-run setup (idempotent)
node bin/jsbian.js # boot into the shellPersistent state lives in .jsbian_data/ next to the project. Delete it
(or run erase-to-first-state --yes from inside the shell) to start over.
- Persistent overlay filesystem — a read-only factory image plus a writable layer that survives restarts, backed by disk.
- A real shell — coreutils-style builtins,
$?/&&/||/;,>/>>redirection, users, groups, permissions,su. apt, for real — fetches actual Debian mirrorPackagesindices and downloads/verifies/unpacks genuine.debs (inspectable, but not executable — there's no kernel here). Alongside that, a JSBian-native package repo of plain.jspackages that do run, in a locked-down sandbox, discovered live with no build step.- A simulated PID 1 — services,
systemctl,ps, real init-style boot logging. - A Debian Live–style boot sequence — interactive GRUB menu, kernel/systemd boot log, login prompt, first-boot install wizard.
erase-to-first-state— a real factory reset back to a clean install.- Real host data in
/proc—cpuinfoandmeminforeflect the actual machine JSBian is running on.
JSBian's default apt source is
JSBian-apt-repo — real,
runnable .js packages, discovered live (no build step, no manual index
to maintain). See its CONTRACT.md for the package format, the sandbox
a package runs in, and how to stand up your own repo with the same
structure.
Node.js 18+. Newer Node (22.15+/23.8+) is recommended — real .deb
extraction uses zlib's built-in zstd support, which only exists on
newer Node, and xz-compressed packages need a system xz binary on
PATH (falls back to a simulated install otherwise).
MIT.