A minimal POSIX conformant operating system

distribution-choiceposix

For educational purposes, I'd like to start with a POSIX compliant base, including a shell, basic utilities, and an ANSI C compiler, then see what kind of environments I can build by putting packages together.

However, most minimal POSIX conformant operating systems I've come across seem to be embedded and/or proprietary. Are there any such open source systems I can easily run under Virtualbox?

I have searched around a little about building such an environment from scratch, but it seems like it's a lot of work to simply get a bootable/usable environment, much less a a POSIX compliant one. I might try my hands at building a POSIX OS someday, but I'd first like to be a bit more computer savvy beforehand.

Note:

I think I have heard somewhere that Linux is not completely POSIX conformant, but as long as I can compile and build some of the more common and essential open source tools (like wget and w3m), I would be pretty happy, whether or not it used the Linux kernel. Same goes for the other basic components I would imagine might come with the operating system (e.g. glibc)

Best Answer

POSIX does not specify a complete operating system, so any POSIX-compliant OS will have commands that aren't in POSIX (like init, mkfs, passwd, …). But different OSes have different extensions, and GNU tools (found on non-embedded Linux systems) have a lot.

BusyBox is a set of command-line tools that is intended for embedded Linux systems. It contains most of the utilities and options mandated by POSIX (it's not complete, but it comes close). You can make a running Linux system with a bootloader, a Linux kernel, BusyBox, and Dropbear if you want to log in over SSH. Add Gcc if you want to do development on the minimal system.

If you prefer to start from a full but small distribution, look at MINIX 3. This is a small unix system intended for embedded systems and for teaching.

If you want a more easily extensible system, look at OpenBSD. OpenBSD is focused on security and is conservative on features, but the core system does include major components such as Perl and Apache.