Sortix
Sortix is a small self-hosting operating-system aiming to be a clean and modern POSIX implementation.
It is a hobbyist operating system written from scratch with its own base system, including kernel and standard library, as well as ports of third party software. It has a straightforward installer and can be developed under itself. Releases come with the source code in /src, ready for tinkering.
It has been in development since February 08 2011 by a single developer and contributors. The latest nightly builds are a stable and capable server platform, a powerful development platform, and a simple desktop solution. The system is still young and future releases will add missing features such as SMP and USB support.
Sortix 1.0 was released in March 2016. Its goal was to be an self-hosting system, installable on virtual machines and real hardware alike. Since then the project has switched to a rolling distribution with nightly stable builds and the Sortix 1.1 milestole release is nearing completion.
Sortix is free software licensed under the ISC license. This website is self-hosted on a Sortix server.
Features
- Available for 32-bit and 64-bit x86 systems.
- Installable and self-hosting.
- Command-line environment with many standard programs.
- Coherently designed base system written from scratch.
- Kernel written from scratch.
- libc written from scratch.
- Manual pages.
- ATA and AHCI harddisk drivers.
- Includes system source code.
- Development tools such as gcc and make.
- ext2 filesystem.
- Partition editor with MBR and GPT support.
- Works well in virtual machines.
- Games such as asteroids.
- Ports of over 50 third party libraries and programs.
- This release was built under itself.
This release also comes with third party ports such as binutils, bison, bochs, bzip2, e2fsprogs, flex, dash, diffutils, gawk, gcc, git, grep, grub, gzip, make, mdocml, nasm, python, patch, sed, tar, xorriso, xz, as well as a large number of libraries and other programs.
Prevew
The nightly builds towards 1.1 contain countless new features eight years in the making:
- Network stack with UDP and TCP via IPv4.
- 40+ new ports including ssh, nginx, emacs, irssi, links, nano, ntpd, perl, qemu, sqlite, vim, and many more.
- A new init(8) system with parallelism and dependency graph for daemons.
- A new powerful ports system with freshly updated recent upstream releases.
- Support for CDROMs via ata(4) and ahci(4).
- A simple desktop environment with a grapical user interface and multiple graphical terminals.
- The operating system is now 100% self-hosting including ports and runs its own infrastructure.
- Ability to amend release .iso's with additional logic, scripts, and behaviors.
- Power efficient idling.
- A ton of bug fixes and new features.
- A couple big surprises are coming soon.
- And much, much more. Give the nightly builds a try and stay tuned for the official 1.1 release.
Limitations
It is important to understand what limitations Sortix currently has. These areas are being worked on and will addressed be in future releases.
- The system protects against network threats but not yet against local multi-user attacks.
- No support for USB.
- No support for symmetric multiprocessing.
- The manual pages only partially document Sortix specifics.
- No dynamic linking.
- No graphics drivers (graphics only if bootloader support or in VMs).
- No sound drivers.
Nonetheless, the underlying system is surprisingly capable and the lead developer dual boots it on his computers.
Details
Sortix is developed by Jonas 'Sortie' Termansen.
Sortix is written in C with a C++ kernel. It has a monolithic kernel and uses the System V ABI. It has its own system call ABI. ext2 is implemented as an user-space filesystem but will be moved to a kernel driver in the next release. This release contains NetBSD's libm but will be replaced by musl's libm in the next release. The kernel is fully multi-threaded with 1:1 preemptive scheduling, where only interrupt handlers run with interrupts disabled.
The operating system implements primarily modern POSIX interfaces, while refusing to implement obsolete or troublesome interfaces unless the compatibility constraints are overwhelming. Poor third party code tends to not compile which draws attention to it and is an opportunity to fix it. Standards are embraced and not deviated from without good reason. The lack of compatibility constraints compared to other operating systems makes it possible to make a cleaner implementation.
The system is halfway through becoming multi-user and while security vulnerabilities are recognized as bugs, it should be considered insecure at this time.
The master branch towards Sortix 1.1 currently has 262k lines of source code, the Sortix 1.0 release has 169k lines of source code (released 28 Mar 2016), version 0.9 had 144k lines of source code (released 30 Dec 2014), version 0.8 had 117k lines of source code (released 19 Dec 2013), version 0.7 had 43k lines of source code (released 10 Sep 2012), version 0.6 had 30k lines of source code (released 18 Mar 2012), version 0.5 had 23k lines of source code (released 06 Dec 2011), version 0.4 had 16k lines of source code (released 08 Sep 2011), and version 0.3 had 8k lines of source code (released 28 May 2011). Development of Sortix began around 8 Feb 2011. These counts don't include the ports collection, but as of Sortix 0.8, it does count the netbsd libm which is 28k lines.
Contact
The #sortix IRC channel on irc.sortix.org is a community where you can get support and where development is coordinated. Please feel free to drop by to show your support.
Bugs can be filed at the issue tracker. Please feel free to submit pull requests here as well as reproducible bugs. If uncertain, ask on IRC or send a quick email.
Jonas 'Sortie' Termansen can be contacted at sortie@maxsi.org. See also his personal website.