In 1969-1970, Kenneth Thompson, Dennis Ritchie, and others at AT&T Bell Labs began developing a small operating system on a little-used PDP-7. The operating system was soon christened Unix, a pun on an earlier operating system project called MULTICS. In 1972-1973 the system was rewritten in the programming language C, an unusual step that was visionary: due to this decision, Unix was the first widely-used operating system that could switch from and outlive its original hardware. Other innovations were added to Unix as well, in part due to synergies between Bell Labs and the academic community. In 1979, the “seventh edition” (V7) version of Unix was released, the grandfather of all extant Unix systems.
After this point, the history of Unix becomes somewhat convoluted. The academic community, led by Berkeley, developed a variant called the Berkeley Software Distribution (BSD), while AT&T continued developing Unix under the names “System III” and later “System V”. In the late 1980’s through early 1990’s the “wars” between these two major strains raged. After many years each variant adopted many of the key features of the other. Commercially, System V won the “standards wars” (getting most of its interfaces into the formal standards), and most hardware vendors switched to AT&T’s System V. However, System V ended up incorporating many BSD innovations, so the resulting system was more a merger of the two branches. The BSD branch did not die, but instead became widely used for research, for PC hardware, and for single-purpose servers (e.g., many web sites use a BSD derivative).
The result was many different versions of Unix, all based on the original seventh edition. Most versions of Unix were proprietary and maintained by their respective hardware vendor, for example, Sun Solaris is a variant of System V. Three versions of the BSD branch of Unix ended up as open source: FreeBSD (concentrating on ease-of-installation for PC-type hardware), NetBSD (concentrating on many different CPU architectures), and a variant of NetBSD, OpenBSD (concentrating on security).
The real reason for Unix’s popularity? Many hackers feel that Unix is the Right Thing—the One True Operating System. Hence, the development of Linux by an expanding group of Unix hackers who want to get their hands dirty with their own system.
Versions of Unix exist for many systems, ranging from personal computers to supercomputers such as the Cray Y-MP. Most versions of Unix for personal computers are quite expensive and cumbersome. At the time of this writing, a one-machine version of AT&T’s System V for the 386 runs at about $US1500.
Linux is a freely distributable version of Unix, originally developed by Linus Torvalds, who began work on Linux in 1991 as a student at the University of Helsinki in Finland. Linus now works for Transmeta Corporation, a start-up in Santa Clara, California, and continues to maintain the Linux kernel, that is, the lowest-level core component of the operating system.
Linus released the initial version of Linux for free on the Internet, inadvertently spawning one of the largest software-development phenomena of all time. Today, Linux is authored and maintained by a group of several thousand (if not more) developers loosely collaborating across the Internet. Companies have sprung up to provide Linux support, to package it into easy-to-install distributions, and to sell workstations pre-installed with the Linux software. In March 1999, the first Linux World Expo trade show was held in San Jose, California, with reportedly well over 12,000 people in attendance. Most estimates place the number of Linux users worldwide somewhere around the 10 million mark (and we expect this number will look small by the time you read this).
Inspired by Andrew Tanenbaum’s Minix operating system (another free Unix for PCs—albeit a very simple one), Linux began as a class project in which Linus wanted to build a simple Unix system that could run on a 386-based PC. The first discussions about Linux were on the Usenet newsgroup comp.os.minix. These discussions were concerned mostly with the development of a small, academic Unix system for Minix users who wanted more.
The very early development of Linux dealt mostly with the task-switching features of the 80386 protected-mode interface, all written in assembly code. Linus writes:
After that it was plain sailing: hairy coding still, but I had some devices, and debugging was easier. I started using C at this stage, and it certainly speeds up development. This is also when I start to get serious about my megalomaniac ideas to make “a better Minix than Minix.” I was hoping I’d be able to recompile gcc under Linux some day …
Two months for basic setup, but then only slightly longer until I had a disk driver (seriously buggy, but it happened to work on my machine) and a small filesystem. That was about when I made 0.01 available [around late August of 1991]: it wasn’t pretty, it had no floppy driver, and it couldn’t do much anything. I don’t think anybody ever compiled that version. But by then I was hooked, and didn’t want to stop until I could chuck out Minix.
No announcement was ever made for Linux Version 0.01. The 0.01 sources weren’t even executable: they contained only the bare rudiments of the kernel source and assumed that you had access to a Minix machine to compile and play with them.
On October 5, 1991, Linus announced the first “official” version of Linux, version 0.02. At this point, Linus was able to run bash (the GNU Bourne Again Shell) and gcc (the GNU C compiler), but not much else was working. Again, this was intended as a hacker’s system. The primary focus was kernel development; none of the issues of user support, documentation, distribution, and so on had even been addressed. Today, the situation is quite different—the real excitement in the Linux world deals with graphical user environments, easy-to-install distribution packages, and high-level applications such as graphics utilities and productivity suites.
Linus wrote in comp.os.minix:
Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers? Are you without a nice project and just dying to cut your teeth on an OS you can try to modify for your needs? Are you finding it frustrating when everything works on Minix? No more all-nighters to get a nifty program working? Then this post might be just for you.
As I mentioned a month ago, I’m working on a free version of a Minix-lookalike for AT-386 computers. It has finally reached the stage where it’s even usable (though may not be depending on what you want), and I am willing to put out the sources for wider distribution. It’s just version 0.02 … but I’ve successfully run bash, gcc, GNU make, GNU sed, compress, etc. under it.
After Version 0.03, Linus bumped the version number up to 0.10, as more people started to work on the system. After several further revisions, Linus increased the version number to 0.95, to reflect his expectation that the system was ready for an “official” release very soon. (Generally, software is not assigned the version number 1.0 until it’s theoretically complete or bug-free.) This was in March 1992. Almost a year and a half later, in late December 1993, the Linux kernel was still at Version 0.99.pl14—asymptotically approaching 1.0. Version 1.0 appeared in March 1994. As of the time of this writing (March 1999), the current kernel version is 2.2.6, while the 2.3 kernel versions are being concurrently developed. (We’ll explain the Linux versioning conventions in detail later.)
Linux could not have come into being without the GNU tools created by the Free Software Foundation. Their gcc compiler, which we’ll discuss in Chapter 13 gave life to Linus Torvalds’s code. GNU tools have been intertwined with the development of Linux from the beginning. Because of the critical contributions of these tools, the Free Software Foundation even requests that distributions of Linux with accompanying utilities be called GNU/Linux.
Berkeley Unix (BSD) has also played an important role in Linux—not so much in its creation, but in providing the tools that make it popular. Most of the utilities that come with Linux distributions are ported from BSD. Networking daemons and utilities are particularly important. The kernel networking code for Linux was developed from the ground up (two or three times, in fact), but the daemons and utilities are vintage BSD.
Today, Linux is a complete Unix clone, capable of running the X Window System, TCP/IP, Emacs, Web, mail and news software, you name it. Almost all major free software packages have been ported to Linux, and commercial software is becoming available. In fact, many developers start by writing applications for Linux, and port them to other Unix systems later. More hardware is supported than in original versions of the kernel. Many people have executed benchmarks on Linux systems and found them to be faster than workstations from Sun Microsystems and Compaq, and Linux performs better than or as well as Windows 98 and Windows NT on a wide range of benchmarks. Who would have ever guessed that this “little” Unix clone would have grown up to take on the entire world of personal and server computing?