pure JavaScript · zero dependencies · Node 22+

JOS

A complete userspace operating environment written in pure JavaScript. Real shell, real filesystem, real packages, real networking — and a pure-JS x86-64 Linux emulator that runs actual Ubuntu binaries. No VM. No kernel. No Alpine. Just JavaScript.

jos — root@jos:~#
what's inside

A whole OS, one process

Everything below is implemented in JavaScript and persisted to ~/.jos/

⌨

Real Shell

Tokenizer, parser, pipelines, redirects, &&/||, aliases, history, tab-completion, background jobs — a genuine readline shell, not a prompt printer.

📁

Virtual Filesystem

Persistent VFS with rwx permissions, ownership, symlinks, fsck, and host-directory mounts. Everything survives restarts.

📦

Package Manager

JPKG installs real packages with semver dependency resolution, sha256 integrity checks, and an --allow-scripts trust gate.

💻

Ubuntu Layer

apt/dpkg front-ends over JPKG, Ubuntu 24.04 persona, /etc/os-release, host passthrough for git, python3, ssh.

⚙

Services & Cron

systemd-style units with dependencies, autostart, systemctl, and a real cron scheduler that executes entries on a ticker.

🧮

Pure-JS x86-64 Emulator

An ELF loader, a BigInt-register x86-64 CPU interpreter, and a Linux syscall layer backed by the JOS rootfs. Runs real Ubuntu binaries — no kernel, no VM.

architecture

How it fits together

One Node process. Every layer is a real subsystem, not a stub.

jos → bin/jos.js → Bootloader (staged init, banner, services)
→ Kernel → syscall() dispatch, cron ticker, shutdown
→ Shell (parser + readline) → ~70 commands
    ├─ filesystem/VFS ─── persistent tree, permissions, host mounts
    ├─ processes ──────── PID table, jobs, signals
    ├─ packages/JPKG ───── repos, deps, integrity
    ├─ services ───────── units, deps, autostart
    └─ ubuntu/ (the fun part):
         deb.js  → pure-JS .deb parser/extractor (ar + tar + zstd)
         elf.js → ELF loader, PT_LOAD, PT_INTERP, auxv stack
         cpu.js → x86-64 interpreter (BigInt regs, SSE2 subset)
         syscalls.js → Linux syscalls → JOS rootfs + page map
quick start

Up in one command

Node.js 22+ is the only requirement.

# from the repo
$ git clone https://github.com/live-by-unix/JOS.git && cd JOS
$ ./jos
JOS 1.0.0 — JavaScript Operating System
[ OK ] filesystem mounted [ OK ] kernel online [ OK ] 6 services started
root@jos:~# uname -a
JOS jos 1.0.0 x86_64 GNU/Linux (pure JavaScript)
$ ./jos -c "apt update && apt install hello && hello" # one-shot mode
$ npm install -g . && jos # install globally
the fine print

What it is — and isn't

An OS environment, stated honestly.

Real

Persistent filesystem with permissions, process table, package manager with dependency resolution and integrity checks, real HTTP/DNS networking, scripting engine, cron, services. The x86-64 emulator executes genuine Ubuntu ELF binaries through a JS syscall layer.

Simulated

JOS processes are cooperative async tasks in one Node process — no hardware isolation or POSIX signals. The app runtime is not a sandbox: untrusted apps can reach host APIs. The x86 emulator covers a subset of instructions/syscalls — simple static binaries work; glibc-heavy binaries are still being debugged.