Despite powering over 90% of cloud workloads today, Unix (and Linux with it) had humble beginnings. Jim Hall discusses how Unix from Bell Labs in the 1970s became the backbone of many modern operating systems.
The Origins of Unix
In the early days of computing, users interacted with the computer through a variety of byzantine means. The original ENIAC didn’t even feature a “programming interface” like we think of such things today; instead, programmers connected separate “functional units” together using plugs and wires. As computers became more practical, they became a platform for batch operations, such as via stacks of punched data cards.
In later, more “modern” systems like the mainframe, system management remained complex. Creating a file required specifying the amount of disk space to allocate plus other attributes. Operators typically interacted with the system using typewriter-like paper terminal devices. And in those early days, that’s how people expected to work with computers.
In the mid- to late-1960s, MIT, Bell Labs, and GE collaborated on a new system called MULTICS, the Multiplexed Information and Computing Service. MULTICS was to be a revolution in computing. But through its development, MULTICS also became increasingly complex. Frustrated with the project, Bell Labs pulled out, leaving others to later bring the project forward, albeit very late.
In the meantime, Ken Thompson returned from MULTICS to Bell Labs to work on other projects. One effort involved a particularly fast disk drive attached to a DEC PDP-7 minicomputer. Thompson wanted to optimize throughput on this drive—and by extension, to any storage device. So, he began work on a disk scheduler.
In tackling this project, Thompson realized his test project was entering “Operating System” territory. Over the next three weeks while his wife was away on vacation to visit his parents, Thompson filled in the missing pieces, and added an exec call interface, an assembler, and editor, and a shell. And from those small beginnings, Unix was born.
Throughout its development at Bell Labs, there was no “master design” that defined what Unix should do or become. Instead, Unix grew organically as different users required new features.
One of my favorite stories of early Unix is how the Unix researchers managed to purchase a new computer system to continue their work, and created a new standard Unix command at the same time. The Patents department planned to purchase a new dedicated computer system to write patent applications on behalf of Bell Labs. The Unix team suggested the Patents department buy a new DEC PDP-11 minicomputer, and the Unix team would put Unix on it and write custom software to help the Patents department write patent applications. That new software to write patents? A new implementation of the Roff document formatting system, itself a derivation of an earlier CTSS program called RUNOFF. Today, “New Roff” or
nroff, is a core part of Unix.
The Unix commands themselves were given very short names. The
mv, and other standard Unix commands were so short because the early Model 33 Teletype terminals used at Bell Labs required significant effort to type each letter. It was easier to type
rm than a more descriptive command name like
One of Unix’s defining features, the “pipe,” which allowed one command to send its output to another command for additional processing, was also added at the behest of another Bell Labs researcher, Douglas McIlroy. Until then, commands acted on single files at a time. But with pipes, you could string multiple commands together to create more interesting results. For example, the
ls command lists the files in a directory, and the
wc command counts the lines of its input. If you connect the two commands together as
ls|wc , you get the number of files in a directory.
Other commands were similarly added because someone asked for them. Thompson wrote the
grep command based on a suggestion from McIlroy that Unix should have a utility to find text in files. Thompson reused code from the Unix
ed editor to create a utility to perform a “global regular expression print” of any text that matched the user’s regular expression. This “global regular expression print” command was named simply
grep, now a standard Unix command.
Unix continued to grow, mostly as research and as a platform for projects inside Bell Labs until the mid-1980s. Around that time, a bunch of different vendors started selling their own versions of Unix, including Hewlett Packard’s HP-UX, IBM’s AIX, Microsoft’s Xenix, Sun’s SunOS (later rebranded Solaris), among others. In 1983, Richard Stallman started a new project to create a Free Software version of Unix, called GNU (a recursive acronym, meaning “GNU’s Not Unix”).
Every distribution of Unix was slightly different and incompatible with each other. Some were derived from the original AT&T Bell Lab’s Unix, like HP-UX and AIX. Other versions of Unix were derived from a popular university variant from the University of California at Berkeley, called BSD for “Berkeley Software Distribution.” Many of the commands were the same or similar between the different Unix versions, but the details in how you managed the system usually differed greatly. One key difference was how Unix booted itself: AT&T “System V” Unix uses run levels controlled by a central
/etc/inittab file, while BSD Unix starts everything using run control scripts starting with the
Other Unix systems came and went over the 1980s and 1990s. Steve Jobs, after being ousted as Apple’s CEO in 1985, founded NeXT, which produced its own variant of Unix, derived from BSD. NeXT brought several innovations to Unix, including a microkernel based on Mach. NeXT’s graphical desktop, NeXTSTEP, added other new ideas, such as Display PostScript to create on-screen graphics, a “dock” of available and running applications, and an object-oriented application layer with toolkits.
In 1991, a Finnish student named Linus Torvalds started work on a project that later became the Linux kernel. On August 25, 1991, Torvalds posted a brief announcement to a Usenet discussion group about his hobby project, and invited others to contribute to it. Torvalds released Linux under the GNU General Public License, which meant anyone could modify Linux to fix bugs or to add new features. This “open source” or “Free Software” model quickly drove new Linux development.
Communities popped up around Linux, porting GNU tools and other Unix commands to run on Linux. In 1992, developers ported the X Window System, giving Linux its first graphical user interface. The result is what most people think of when we say “Linux,” although Linux is actually just the kernel that runs everything.
While proprietary Unix systems still exist, most Unix systems are Linux. At least on web servers, Linux dominates. Linux is also common for many enterprise workloads, including application servers and database servers. It’s hard to figure out exactly how many Linux servers run things, but many estimates suggest Linux runs more than two-thirds of web servers and other Internet infrastructure. Even Microsoft supports Linux; it’s Azure platform runs Linux, as does the Windows Subsystem for Linux on Windows desktops.
On the desktop, Linux never gained a significant foothold. A running gag in the Linux community is “Next year will be the Year of the Linux Desktop.” But Windows reigns supreme on the desktop. If you’re looking for Unix on the desktop, however, consider Apple’s macOS. In 1996, as part of Steve Jobs’s return to Apple as CEO, Apple purchased NeXT, and used NeXT as the basis for the next-generation operating system on new Macs. MacOS is really Unix under the hood; open a terminal window, and you can find a Unix shell with the standard Unix utilities. In fact, macOS is an official Unix, recognized by the Open Group.
Where is Unix headed next? I’m not sure if “Unix” is the right label anymore. In a time when Linux systems vastly outnumber Unix servers, we may have passed the point where “Unix” holds much meaning. It’s no longer about “Unix as a platform” but “Linux as a platform.” And just as Unix grew beyond its original design, adding new features where needed, Linux continues to evolve to meet new needs. At least for the foreseeable future, it’s about “Linux” not “Unix.”