The Unix Story: The Operating System That Ate the World
Abstract
Unix began in the summer of 1969 as an unofficial project on a little-used PDP-7 at Bell Labs, after AT&T had withdrawn from the Multics project. Ken Thompson wrote the first version in about three weeks while his wife and son were away. Bell Labs’ patent department paid for the next machine because it needed a text formatter. In 1973 Thompson and Dennis Ritchie rewrote the kernel in C, which made it portable, and an antitrust decree that kept AT&T out of the computer business meant the system was licensed to universities for little more than the cost of the tape. A whole generation of students learned operating systems from a photocopied commentary on its source code. Berkeley’s version carried the internet protocols; the workstation vendors built their businesses on it and fought the Unix Wars over it. None of the commercial Unixes dominates today. Linux, macOS, iOS and Android, all descendants or reimplementations of it, run most of the world’s servers and phones.
Multics
In the mid-1960s MIT, Bell Labs and General Electric were building Multics (Multiplexed Information and Computing Service), a time-sharing system meant to work like a public utility: one large machine serving hundreds of users at once, with hierarchical files, dynamic linking and protection rings. The system needed a specially built GE-645 mainframe, its design documents ran to thousands of pages, and it was years behind schedule. In 1969 Bell Labs, the research arm of AT&T, withdrew from the project.
Several of the Bell Labs researchers who had worked on Multics had come to like interactive computing and now had none. The lesson they took away was not that time-sharing was wrong but that Multics had tried to do too much at once.
The PDP-7
Ken Thompson had a game to run. He had written Space Travel, a simulation in which the player steered a ship through the solar system, on the GE-635 mainframe, where each game cost about $75 in billable computer time. He moved it to a little-used DEC PDP-7 in a corner of Bell Labs’ Murray Hill, New Jersey, building. He was also working on a disk-scheduling algorithm for the PDP-7’s tall single-platter disk drive, and to test it he needed programs that could load and run code. Step by step he was writing an operating system.
In the summer of 1969 his wife Bonnie took their son to visit family in California for three weeks. Thompson, as he later told Brian Kernighan, realised “I was three weeks from an operating system.” He wrote one piece per week: an editor, an assembler and the kernel, all in PDP-7 assembly language. By September the PDP-7 was running its own system. Thompson put it plainly in 2011: “I did the first of two or three versions of UNIX all alone.” Ritchie contributed the idea of device files, which let programs treat terminals and disks as files, and McIlroy ported a compiler-compiler from which Thompson built the language B.
1969 vs. 1971: Two Birth Dates
The 1969 PDP-7 system was the unnamed prototype. The name “Unics”, a pun on Multics, appeared in 1970; Kernighan claims the coinage and says no one remembers who changed the spelling to “Unix.” Unix First Edition (V1), the first release with a printed manual, is dated 3 November 1971 and ran on the PDP-11/20. “Unix was born in 1969” means the PDP-7 prototype; “Unix V1” means the 1971 PDP-11 release.
The Patent Department
Bell Labs management, having just left Multics, did not want to fund another operating system. In 1970 Thompson and Ritchie found a different argument: the Labs’ patent department needed a way to prepare patent applications, and they offered to provide a text-processing system if the company bought them a new PDP-11/20. The machine arrived, Unix was moved to it, and the patent department became its first production user, typing applications with an editor and formatting them with roff, a text formatter written in PDP-11 assembly language. Roff’s descendant troff later typeset Bell Labs’ papers and books, and the habit of writing documentation as formatted text files produced the man page, which first appeared in the UNIX Programmer’s Manual of 3 November 1971.
Pipes and the Unix Philosophy
Unix was built around a few ideas that look like design principles in hindsight and were habits at the time.
Everything is a file. Disk files, terminals and devices were all streams of bytes, accessed through the same read and write calls. A program that read from a file could read from a terminal without modification.
Pipes. Doug McIlroy, who headed the department, had proposed in a 1964 memo that programs should be connected like lengths of garden hose. He kept pushing, and in 1973, for Version 3, Thompson added the pipe() system call and pipe notation to the shell “in one feverish night”, as McIlroy remembered it. “The next day saw an unforgettable orgy of one-liners as everybody joined in the excitement of plumbing.” A file could now be sorted, filtered and counted in one line:
sort names.txt | grep "Smith" | wc -lThe shell as a programming language. The command interpreter could read commands from a file as easily as from the keyboard, so a sequence of commands was itself a program.
Peter Salus later condensed McIlroy’s account of the approach into three sentences: “Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.” None of the ideas was entirely new, but Unix was the first system in which they came together in one small, usable whole.
C and the 1973 Rewrite
An operating system written in PDP-11 assembly language ran only on the PDP-11. Thompson’s B, derived from BCPL, had no data types and could not use the byte-addressed PDP-11 well, so Ritchie extended it into C (1972), which added types and structures while keeping direct access to memory through pointers. In 1973 they rewrote the Unix kernel in C for Version 4. It was one of the first operating system kernels written mainly in a high-level language, and McIlroy estimated that the two of them wrote or debugged about 100,000 lines of code that year.
The payoff came with portability. In 1977 Bell Labs bought an Interdata 8/32, a machine quite unlike the PDP-11, to find out what it took to move Unix; the same year a group at the University of Wollongong in Australia independently ported it to the Interdata 7/32. Version 7 (1979) was the first Unix designed to be ported, and within a few years it ran on the Zilog Z8000, the Intel 8086 (as Microsoft’s Xenix) and the first Sun workstations. It also introduced the Bourne shell and still had only about 50 system calls. Many long-time users call it “the last true Unix.” The fuller story of the language is in Dennis Ritchie and the C Language.
Out of Bell Labs
Thompson and Ritchie presented Unix to the outside world at the ACM Symposium on Operating Systems Principles at IBM’s research centre in Yorktown Heights, New York, in October 1973, and published “The UNIX Time-Sharing System” in Communications of the ACM in July 1974. Requests for the software followed.
AT&T could not sell it. A 1956 consent decree that ended an antitrust case restricted the Bell System to “common carrier communications services” and required it to license its patents on request. So AT&T licensed Unix to universities for little more than the cost of the tape. Version 5 went to educational institutions in 1973; Version 6 (1975) was the first licensed to companies, at $20,000 for the source code as-is, with no support. The first Unix users’ meeting, in New York in 1974, drew a few dozen people and grew into the USENIX association. By 1978 more than 600 machines were running some form of Unix.
Because licensees received no support, they helped each other, and the system carried its own means of doing so. UUCP, a program for copying files between Unix machines over dial-up telephone lines, was the basis on which two Duke graduate students built Usenet in 1979, and in 1975 RFC 681 described how to run Unix as a small host on the ARPANET.
Unix Inside AT&T
The research group was not the only user at Bell Labs. Engineers who wrote software for the Bell System’s large IBM and UNIVAC mainframes needed a better place to edit, store and submit it, and from 1973 a computer centre serving a 1,000-person division ran Unix for them. Its tools became PWB/UNIX (Programmer’s Workbench), released inside AT&T on 1 July 1977 and based on Version 6. It sent batch jobs to IBM System/370 and UNIVAC mainframes and included Marc Rochkind’s SCCS, the first revision control system on Unix, and John Mashey’s shell, a predecessor of the Bourne shell; in 1977 it served about 1,100 programmers. By late 1976, John Mashey later recalled, almost every project at Bell Labs either used Unix for development and text processing or was delivering operations support systems for the telephone network that ran on it. Most of PWB later went into the commercial System III and System V, so the Unix that AT&T eventually sold was as much the programming-shop system as the research one.
The Lions Book
The University of New South Wales in Sydney obtained the Unix source code in 1975. John Lions, who taught operating systems there, wrote a line-by-line commentary on the Version 6 kernel for his students: system start-up, processes, interrupts, system calls, files and input/output, about 10,000 lines of C and assembly language in all. A Commentary on the Sixth Edition UNIX Operating System was printed in 1977.
AT&T’s licence for Version 7 and later forbade using the source code for teaching, and the book could no longer be distributed legally. It circulated anyway, in photocopies of photocopies, and is thought to be the most copied book in computer science. Its most quoted line is a comment in the source itself, at line 2238, where the code switches between processes: “You are not expected to understand this.” Ritchie later explained that it was meant in the spirit of “This won’t be on the exam.” The book was officially published only in 1996, after the Santa Cruz Operation, then the owner of the Unix code, gave permission.
Berkeley
Unix reached the University of California, Berkeley in 1974 at the request of professor Bob Fabry, and Thompson spent the 1975–76 academic year there as a visiting professor. A graduate student who arrived that year, Bill Joy, began modifying the system and from 1977 mailed tapes of the Berkeley additions to other universities: the Berkeley Software Distribution (BSD). Joy wrote the vi editor (1976) and the C shell; Berkeley rewrote the file system for speed, added virtual memory for the VAX and, with DARPA funding, built the TCP/IP implementation of 4.2BSD (1983), the version through which the ARPANET protocols reached the universities. The broader story of that transition is told in The Connected World. From then on there were two Unix lines, AT&T’s and Berkeley’s, and every commercial version descended from one or both.
The Commercial Wave and the Unix Wars
In the 1980s Unix gained a second market alongside the universities: the engineering workstation. Sun Microsystems, founded in 1982 by three Stanford graduate students, Andy Bechtolsheim, Vinod Khosla and Scott McNealy, with Joy joining as the fourth founder, shipped every machine with its BSD-based SunOS, and a Unix workstation at $10,000 to $30,000 filled the gap between personal computers and minicomputers. Hewlett-Packard (HP-UX), IBM (AIX), Digital Equipment (Ultrix, later Digital UNIX), Silicon Graphics (IRIX) and Microsoft (Xenix) all sold their own versions. Each ran only on its maker’s hardware, and software companies had to port their products to every one of them.
The break-up of the Bell System, effective 1 January 1984, freed AT&T to sell Unix as a product, which it did as System V. When AT&T took a stake in Sun in 1988 and the two set out to merge their systems, the other vendors founded the Open Software Foundation, and the industry split into two camps that fought over standards, licences and the UNIX trademark until a truce in 1993. AT&T’s Unix Systems Laboratories also sued Berkeley in 1992 over the code in BSD, which held up the free BSDs at the moment Linux appeared. The case settled in 1994. These events are told in Commercial Unix and the Unix Wars and The BSD Family.
Dead End: Multics and Plan 9
Multics did ship and ran at MIT, at Honeywell’s commercial customers and at a few government sites through the 1980s. It had stronger security than Unix and earned a B2 rating from the U.S. Department of Defense. It was also expensive, tied to Honeywell hardware and hard to port. The last Multics system, at the Canadian Department of National Defence in Halifax, Nova Scotia, was shut down on 30 October 2000.
Bell Labs’ own successor fared no better. Plan 9 from Bell Labs, released to universities in 1992 by a group including Thompson, Ritchie and Rob Pike, extended “everything is a file” to network resources, windows and process control, so that a whole network of machines could be treated as one file system. It never found users outside research. Unix was by then established in universities and industry, with its tools, drivers, books and trained administrators, and Plan 9 offered no compatibility with any of it. Several of its ideas survived elsewhere: UTF-8 was designed for Plan 9, its 9P file protocol is used in virtualisation software, and Go, the language Thompson and Pike designed at Google in 2009, inherited parts of its compiler and its concurrency style.
Unix Today
None of the commercial Unix systems of the 1980s is a major platform today. IBM’s AIX survives on its POWER servers; Sun’s Solaris, HP-UX, IRIX and Tru64 have reached or are nearing the end of support. The code AT&T owned passed through Novell to the Santa Cruz Operation and then to the SCO Group, which spent the 2000s suing IBM over Linux; in 2007 and again in 2010 courts found that Novell, not SCO, owned the Unix copyrights, and SCO went bankrupt.
Unix’s descendants and reimplementations are another matter. macOS is built on Darwin, a Mach and BSD system that Apple inherited from Steve Jobs’ NeXT, and has carried The Open Group’s UNIX 03 certification since 2007 (see The macOS Lineage); iOS, iPadOS and watchOS share its kernel. Linux contains no AT&T code but follows Unix in its file hierarchy, shell, tools and system interfaces, which the POSIX standard wrote down; it runs most servers, every system on the TOP500 supercomputer list since 2017, and every Android phone (see Linus Torvalds and Linux and The Linux Distributions). FreeBSD runs Netflix’s content servers and, in modified form, Sony’s PlayStation consoles.
Thompson and Ritchie received the Turing Award in 1983 “for their development of generic operating systems theory and specifically for the implementation of the UNIX operating system.” Ritchie died in October 2011. Thompson moved to Google in 2006, where he co-designed Go. The movement that grew from shared Unix source code is described in The Open Source Revolution.
📚 Sources
- Ritchie, Dennis M. & Thompson, Ken: “The UNIX Time-Sharing System”, Communications of the ACM, Vol. 17, No. 7 (1974) (presented at the Fourth SOSP, Yorktown Heights, October 1973)
- Ritchie, Dennis M.: “The Evolution of the Unix Time-sharing System” (1979/1984)
- Salus, Peter H.: A Quarter Century of UNIX (1994), Addison-Wesley
- Kernighan, Brian W.: UNIX: A History and a Memoir (2019), self-published via Kindle Direct
- Opensource.com, “Origin stories about Unix” (August 2020) (Kernighan’s account of the three weeks, “I was three weeks from an operating system”)
- McIlroy, M. D.; Pinson, E. N. & Tague, B. A.: “UNIX Time-Sharing System: Foreword”, Bell System Technical Journal, Vol. 57, No. 6 (1978)
- History of Unix, Wikipedia (Space Travel and its cost, Unics, the PDP-11 and the patent department, roff, manual of 3 November 1971, 100,000 lines in 1973, 1956 consent decree, Version 5 and 6 licensing, first users’ meeting, RFC 681, Interdata ports, 600 machines in 1978)
- Ken Thompson, Wikipedia (2011 Dr. Dobb’s quote “I did the first of two or three versions of UNIX all alone”)
- Pipeline (Unix), Wikipedia (Version 3, 1973, “one feverish night”, “orgy of one-liners”)
- PWB/UNIX, Wikipedia (1 July 1977, SCCS, Mashey shell, remote job entry, 1,100 users, incorporation into System III and V)
- Mashey, John: “Some UNIX/TS Info”, TUHS mailing list (May 2026) (late 1976: almost every Bell Labs project using Unix or delivering operations support systems on it)
- Version 7 Unix, Wikipedia (portability, Bourne shell, about 50 system calls, “the last true Unix”)
- A Commentary on the UNIX Operating System, Wikipedia (Lions, UNSW 1975 to 1977, Version 7 licence, photocopies, line 2238, 1996 publication)
- ETHW: Lions’ Commentary on the UNIX Operating System (about 10,000 lines of C and assembly)
- McKusick, Marshall Kirk: “Twenty Years of Berkeley Unix”, in Open Sources (1999) (first distribution early in 1977)
- Berkeley Software Distribution, Wikipedia (Fabry 1974, Thompson at Berkeley 1975)
- Sun Microsystems, Wikipedia (founding February 1982, the three Stanford founders and Joy)
- SCO Group, Inc. v. Novell, Inc., Wikipedia (2007 ruling and 2010 jury verdict on Unix copyright ownership)
- Computer History Museum, “This Day in History: October 30” and Multicians.org: Multics history (last Multics site, Halifax, 2000)
- Ritchie, Dennis M.: “The Development of the C Language”, ACM SIGPLAN Notices, Vol. 28, No. 3 (1993)
- ACM Awards: Dennis M. Ritchie (1983 Turing Award citation)
- Single UNIX Specification, Wikipedia (macOS UNIX 03 since Leopard, 2007)
- Image: Pdp-7-oslo-2004.jpeg by Matiashf (CC BY-SA 3.0), via Wikimedia Commons
- Image: Lions Commentary Unix.jpeg by Takuya Oikawa (CC BY-SA 2.0), via Wikimedia Commons