An Introduction to MINIX

It's not Linux, but MINIX can introduce you to the basic concepts without all the baggage.
Navigating MINIX

MINIX remains a shell-based operating system, and its concessions to the desktop are minimal. It starts with a boot menu of different system states, including (assuming you followed the install instructions) a pristine version of the operating system that you can use for recovery. When you are finished, the command shutdown halts the system, and shutdown -r reboots it.

For anyone who has used a UNIX-like system, the MINIX directory hierarchy should be broadly familiar (Figure 2). However, you will notice a few missing top-level directories, such as the ever-contentious /opt, and directories added to operating systems like GNU/Linux for user-friendliness, such as /cdrom and /media. Also missing is /proc, which tells you that the pseudo-filesystem procfs does not exist to access process information from the kernel. Because MINIX runs drivers in userspace, it does not have the need for /proc that GNU/Linux does.

Figure 2. File Hierarchy

Descend a directory level, and you find that the logic of the directory hierarchy is differently applied. For instance, GNU/Linux's /var/spool directory, which contains queues for cron jobs, printing and mail as well as locks, is located in /usr/spool instead. But, such examples are exceptions, and previous experience with UNIX-like systems can only benefit those exploring MINIX for the first time.

What may require more acclimatization is MINIX's naming system for devices. Open /etc/fstab, and, if you accepted the default partitioning scheme during installation, you will see something like:


Although this naming system may seem intimidating at first, in practice, it is very simple. It lists the physical controller and disk, followed by the partition and sub-partition, with the first of each item numbered 0.

Naturally, other distinguishing characteristics of MINIX will become clearer as you explore it in more detail. But if you do need help, MINIX supports man pages, just like most UNIX-like systems, and it includes an interesting application called whichman that attempts to find approximate matches to a query. However, you will not find any info pages, despite the fact that MINIX uses utilities provided by the GNU Project. You also can find help on the MINIX Wiki, although it is not always up to date and often suffers from a lack of detail.

Software Selection and Installation

When you install MINIX, the result is a minimal system (a setup that is in keeping with basic security principles). If you want more, you have to install it yourself. Beyond the basic system, MINIX has a small but well-rounded collection of 135 packages, tailored to the needs of the command line. By default, it uses the ash shell, but BASH and zsh are also available. It includes support for several programming languages, including Tcl, Perl, Python and FLTK, and users can choose between vile, vim and nano for text editors.

Some of MINIX's applications, such as Kermit, might seem old-fashioned from a modern GNU/Linux user's perspective. Others will seem thoroughly contemporary, such as SQLite, OpenSSL and wget. Then, there are the usual suspects, such as ImageMagick, tar and zip. You even can unwind with a game of Nethack on MINIX. In keeping with MINIX's status as an educational operating system, typing a command without any parameters displays a brief summary of usage.

In MINIX, you won't find desktop applications, such as Firefox or Such programs are many times larger than the whole of MINIX, and including them would go against the project's goals of being suitable for embedded systems. Strangely enough, you will find a package for The GIMP. But the closest you will find to Firefox is Lynx, and the closest to is TeX.

For that matter, you will find little attention paid to graphical interfaces in general. The X Window System is available, but the interfaces are few. You can run TWM (Figure 4) for an extremely basic desktop, but with the unaliased text, you are better off at the command prompt. The Equinox Desktop Environment (Figure 3) is considerably more sophisticated, but unless you're doing something like viewing graphics, running any sort of graphical interface in MINIX is mostly beside the point. Although you could study the X Window System in MINIX, the overwhelming majority of the work you might do in MINIX works just as well from the command line, if not better.

Figure 3. Equinox Desktop Environment (EDE)

Figure 4. Timeless Windows Manager (TWM)

Whatever your choice of extras, they are installed with the command packman. Packman opens with a list of the available packages (Figure 5). Dependencies are not resolved automatically in packman, but the list informs you when a package requires another one.

Figure 5. Available Packages in Packman

When you know what packages you want to install, press the q key, and enter their numbers at the prompt (Figure 6). When you are finished installing, press the q key twice to exit.

Figure 6. Installing X with Packman


-- Bruce Byfield (nanday)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Inconsistent naming conventions.

gmo's picture

Given that Minix comes with bash as well, shouldn't you call it GNU/MINIX?
Or, really, shouldn't you just omit the GNU/ part altogether as this is an article about kernels, and GNU don't have anything to do with the kernels (as long as we're not talking about Hurd...).

Anyway I'm surprised that minix3 has gotten so much fatter! I used to run minix on a 8088 with 640 kB memory...


Matt K's picture

No, it should not be called gnu/minix. Many of the gnu tools have been ported to minix, and the user can choose to install them, but it natively runs either its own tools (the default shell is ash), or BSD based tools, which are not licensed under GPL.

Re to An introduction to minix

srinivas v's picture

You forgot to add that the European union is funding the development of minix for a "reliable' operating system. So, just hold on. You might have a free as in freedom version of meego or the like.

excellent. five thumbs up!

Anonymous's picture

Excellent article! A lot of work went into this. Thank you Bruce Byfield! And I love the bonus reference to Ken Brown's failed attempt to discredit Linux and Linus.

Please keep in mind that

mick's picture

Please keep in mind that Minix has shifted it's focus in version 3. Minix3 is designed from the ground up to be a reliable system, not just an academic one. It's promise is to be a system that will never, ever crash( with a 5-10 percent performance overhead of course). To the best of my knowledge it has never failed in testing.

The modular layered design, and in particular the treatment of device drivers( where bugs are far more common) as untrusted user space code also offers enhanced security. Here's an example given by Andrew Tannenbaum. Imagine a situation where a a Minix system's audio driver were exploited.

The computer could "make weird noises," but would have no access to the disk, network or memory subsystems effectively limiting what an attacker could accomplish. Each driver is kept separate from the others and communicates using the kernel, which is small and well understood, to pass messages.Note interestingly that with this design the disk driver cannot actually control the disk.

The reincarnation server is another amazingly cool idea and I am surprised you didn't mention it. It is a system that transparently replaces crashed or misbehaving drivers with copies stored in ram. Tannenbaum has reported testing systems by inducing 800,000 driver crashes and never once did they have a full system crash.