A UNIX with a Go userspace

A UNIX-like operating system on the Linux kernel. Its userspace (init, coreutils, networking, services and SSH) is written mostly in Go.

Go all the way down

PID 1, a busybox-style coreutils, the network stack, device management and the SSH server are all Go programs, statically linked. One language covers the whole base system.

Packaged from source

pkg is a package manager written in Go. It installs from a binary repository whose libraries are all built from source, not copied in from another distribution. pkg install resolves deps, verifies checksums, and upgrades a running system in place.

Desktop and server

It boots to a server, where the Go userspace is up about 20 ms after the kernel starts it, or to a Wayland desktop (labwc, built from source, without Mesa). It runs under QEMU and on cloud VMs, and a GoNIX VM serves this site.

What it is

GoNIX boots a recent Linux kernel and hands off to a Go init as PID 1. From there the system is almost entirely Go: a single multi-call coreutils binary symlinked under dozens of names, DHCP and netlink networking, udev-style device management, service supervision, gettys, and an SSH server. BusyBox, Dropbear and init scripts have no part in it.

Where C is unavoidable (libraries, the compositor, browsers), GoNIX builds it from source against musl and tracks it as packages in its own pkg system, so you can read the whole base system end to end.

Or leave the userland out altogether: Library images pack any Go program with a slim kernel and init into one bootable ISO: a micro-VM that boots on a cloud, from a disk, or in QEMU.

$ ssh root@gonix.dev
GoNIX (a UNIX-like OS with a Go userspace)
$ pkg install htop
$ uname -sm
Linux x86_64

Two architectures

amd64 and arm64, with the same packages on both. On Apple Silicon, arm64 runs natively under QEMU with HVF.

Packages beyond the base

Browsers, editors, a C and Go toolchain, and daemons for cron, syslog and SMTP, installable from pkgs.ulinux.org, the uLinux package repository GoNIX is built on.

Small and legible

A minimal kernel, a Go userspace you can read, and a build system that fits in a few shell scripts and a Dockerfile.

From PID 1 to a login prompt in ~20 ms

Once the kernel starts it, the Go init mounts the filesystems, scans devices, brings up the network and launches every service in about 20 ms. It stacks a writable layer over the initramfs instead of copying it, and runs no shell scripts on the way up.

Boot it yourself