Skip to content

Repository files navigation

Tunix

Tunix is a small Unix-like operating system experiment for x86_64. It includes a custom bootloader, kernel, initramfs-based userspace, framebuffer terminal, and a small set of ported userland tools.

Tunix running the Xfce desktop

Features

  • Custom bootloader and kernel code
  • Persistent ext2 root filesystem on the boot disk (Linux-mountable); the initramfs only seeds it on first boot
  • mount/umount: a real mount table, tmpfs mountable anywhere, bind mounts, and a /proc/mounts that reports it — see Mounting
  • Hard links: link()/linkat(), st_nlink, and a file that outlives the name it was created under — link-test checks it on both filesystems
  • Framebuffer terminal with keyboard input
  • Basic VFS, devfs, procfs, process, and syscall support
  • Symmetric multiprocessing: every processor the firmware describes is started and the scheduler runs processes on all of them — see Multiprocessor
  • GNU userland (coreutils, grep, sed, gawk, findutils, diffutils, tar, gzip, make), Bash, GCC, binutils, nano, Lua, and selected libraries
  • CPython 3.14, built shared so ctypes and C extensions load; python-test exercises threads, subprocess, signals, sockets, epoll, mmap and sqlite3
  • Networking with both ends of TCP: bind/listen/accept as well as connect, and a real loopback, so a server and its client can both run on this machine — tcp-test proves it over 127.0.0.1; see Networking
  • curl, and Git's https:// transport, both out of one static curl port built against mbedTLS — so curl https://… and git clone https://… work. The tool speaks http, https and file over IPv4; ssh:// remotes are not supported
  • Intel HD Audio playback behind ALSA's /dev/snd interface, with alsa-lib ported on top of it: snd-test drives the kernel ioctls directly and alsa-test goes through the library, mixer included
  • dinit as PID 1: services under /etc/dinit.d, controlled with dinitctl
  • Real users: per-process credentials, file permission checks, setuid binaries, and a console login prompt. shadow-utils (login, su, passwd) and sudo are ported. The image ships root / root and tunix / tunix — see Users and Permissions
  • Eight virtual terminals, switched with Ctrl+Alt+F1..F8 or chvt: a login prompt on the first four, the graphical session on the seventh, each with its own screen and keyboard — see Virtual Terminals
  • A full Xfce desktop on Xorg (xfwm4, xfce4-panel, xfdesktop, Thunar and xfce4-terminal), started by the session of whoever logs in, so it runs as that user; a Weston (Wayland) session is also available
  • A graphical login: LightDM with lightdm-gtk-greeter owns the display from boot, authenticating through Linux-PAM — see Display Manager
  • A package manager: xbps, installing from Tunix's own binary repository (tunix-ports, built and published by CI) with Void Linux's x86_64-musl set behind it — xbps-install -S && xbps-install -y tty-clock — see Package Manager
  • A virtio-gpu driver, so the display is scanned out where it lies instead of being copied into the framebuffer every frame; make run-gpu — see virtio-gpu

Quick Start

Initialize submodules first:

git submodule update --init --recursive

Build the disk image:

make all

Run it in QEMU:

make run

Or run headless:

make headless

Clean generated files:

make clean

Documentation

About

Tunix is a x86_64 unix-like operating system

Resources

Contributing

Stars

22 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages