Many of the tools that you use and perhaps even take for granted on a daily basis have their own page in the UNIX story. When you open a terminal, use the shell to pipe output to grep, awk, or sed, or even just stare at a man page, you are touching something which was set in motion over fifty years ago in a building in Murray Hill, New Jersey. We shall tell this tale about how it happened and the chaos that followed which gave us BSD, Linux, and most importantly OpenBSD.


Multics: The Problem UNIX Was Trying to Solve

To understand where UNIX came from, you must first understand what came before it and why it failed.

In the mid-1960s, MIT, Bell Labs (then part of AT&T), and General Electric collaborated on an enormously ambitious project called MulticsMultiplexed Information and Computing Service — a time-sharing operating system for the GE-645 mainframe. The idea was great on paper: a single massive computer that many users could share simultaneously, with a hierarchical file system, dynamic linking, and fine-grained access controls. Multics was genuinely visionary, introducing ideas that remain relevant today.

It was also a disaster in practice.

The system grew enormously complex. It was continuously behind schedule, and continuously underperforming. By 1969, Bell Labs management had seen enough. AT&T quietly withdrew from the Multics project, surrendering the lease on the expensive GE-645 mainframe.

The researchers who had been actively working on Multics suddenly found themselves without a good computer.

Among those researchers were Ken Thompson, Dennis Ritchie, Doug McIlroy, and Joe Ossanna. Joining them that same year was Brian Kernighan, a Canadian computer scientist who had just completed his PhD at Princeton and arrived at Bell Labs’ Computing Science Research Center having spent several summers there as a student, working alongside people on Multics. He had seen exactly how badly that project had gone, and he arrived just as the group was pivoting toward something entirely different.


How Computer Games & A Dusty PDP-7 Gave Birth To UNIX

Ken Thompson had been working on a computer game called Space Travel — a simulation of the solar system — first on Multics and then ported to a GE-635. Running it cost roughly $75 per session in CPU time. That was unsustainable. Thompson found a dusty, underused PDP-7 minicomputer built by the Digital Equipment Corporation (DEC) sitting in a corner of Bell Labs and began porting his game to it.

The PDP-7 was humble hardware — 8K 18-bit words of memory — but it was available and free to use. In the process of making it useful, Thompson began planning out an operating system. He took what he had learned from Multics — the hierarchical file system, the idea of a shell, the user environment — and stripped everything down to its essential core. Where Multics was complexity piled upon complexity, Thompson wanted simplicity: small programs that each did one thing well, connected together by pipes to accomplish complex tasks.

The project had no formal backing from Bell Labs management, no budget, and no name. Thompson, Ritchie, McIlroy, Ossanna, and others simply built it because they wanted it to exist.

By early 1970, the system was working well enough to need a proper machine. To justify a budget for a PDP-11 — a significantly more capable DEC minicomputer — the team needed to sell management on a practical application. The justification they settled on was a text formatting and typesetting system for Bell Labs’ patent department, which needed to prepare and format large volumes of technical documentation. Management took the bait. The PDP-11 order was placed in May 1970. This typesetting mandate was not a sideshow — it pulled Kernighan into the project directly, and the tools he built to fulfil it became a defining part of what UNIX was.

It was around this time that the system finally got a name. Brian Kernighan is generally credited with the idea: UnicsUniplexed Information and Computing Service — a deliberate, sardonic pun on Multics. The name was also pronounced “eunuchs,” which was not accidental. The final spelling as Unix appeared by convention; nobody can quite remember who wrote it first. Kernighan himself claims the coining but admits that “no one can remember” how the spelling settled.


Dennis Ritchie, Brian Kernighan, and the C Language

The early versions of UNIX were written in assembly language — first PDP-7 assembly, then PDP-11 assembly. This meant the system was deeply tied to its hardware and could not be moved to other machines.

Thompson had been developing a language called B (itself derived from an earlier language, BCPL) to use for systems programming. Kernighan contributed to the early documentation of B — he wrote what became the first recorded “Hello, world!” program in his 1972 Tutorial Introduction to the Language B, a small piece of writing that set a template followed by programming tutorials to this day. B was a step up from assembly but lacked the ability to express the hardware-level structures that an operating system required. Dennis Ritchie took B and extended it, adding data types, structures, and the ability to operate precisely at the machine level. The result was C.

The significance of this cannot be overstated. In 1973, Version 4 of UNIX was rewritten almost entirely in C. This was considered radical — the conventional wisdom of the era held that operating system code was too performance-sensitive to be written in anything other than assembly. Thompson and Ritchie proved that wrong. The rewrite produced code that was cleaner, more maintainable, and — crucially — portable. An operating system written in C could, in principle, run on any machine for which a C compiler existed.

C and UNIX were co-created in the deepest sense. Each shaped the other. Ritchie later said the language “grew up with one of the rewritings of the system and, as such, it became perfect for writing systems.”

Kernighan’s role in C was not in designing it — he has always been explicit that the language is entirely Ritchie’s work — but in making it legible to the world. In 1978, Kernighan and Ritchie published The C Programming Language, immediately the definitive reference for C. Known universally as K&R, the book was terse, precise, and brilliantly written. For over a decade it served as the de facto language standard before ANSI formalised one, and the dialect it described — K&R C — carries Kernighan’s initial to this day. A second edition updated for ANSI C followed in 1988. Generations of systems programmers learned C from that book and essentially no other. Its influence on technical writing, not just technical practice, cannot be overstated.

In 1983, Thompson and Ritchie were awarded the Turing Award for their work. In 1999, President Clinton awarded them the National Medal of Technology. Every C program ever written, every operating system descended from UNIX, every networked computer carries Thompson and Ritchie’s legacy.


The UNIX Toolchain: Kernighan’s Workshop

While Thompson and Ritchie were building the kernel and the language, Kernighan was building the ecosystem of tools that made UNIX productive — and in doing so, gave concrete form to the design philosophy that Doug McIlroy had articulated: small programs, each doing one thing well, composable through pipes.

The typesetting mandate that had justified the PDP-11 purchase became Kernighan’s primary domain. Joe Ossanna had written the original troff typesetter, but when Ossanna died unexpectedly young, Kernighan took over its development entirely. He rewrote it as ditroffdevice independent troff — in 1973, generalising it so that the same source document could drive any output device rather than being tied to a specific phototypesetter. This was the portability principle applied directly to documents.

Around ditroff, Kernighan built a suite of preprocessors that transformed plain text markup into typeset output of remarkable quality:

  • eqn (1974, with Lorinda Cherry) — a language for typesetting mathematical equations, designed to be writable by people who knew neither mathematics nor typesetting in depth
  • pic — a language for drawing figures and diagrams, integrated seamlessly into the troff pipeline
  • tbl — a preprocessor for typesetting tables
  • grap (with Jon Bentley) — a language for describing statistical graphs and data charts

The pipeline pic | tbl | eqn | troff became a standard incantation for Bell Labs technical documents, and the output quality rivalled commercial typesetting systems of the era. Bell Labs published its technical journal, research reports, and the UNIX manual pages through this toolchain. Kernighan typeset virtually all of his own books using these tools — he has been producing camera-ready copy from plain text source files for over fifty years.

In 1977, Kernighan co-created AWK with Alfred Aho and Peter Weinberger — the name is the initials of its three authors in order. AWK is a pattern-matching and text-processing language built directly on UNIX philosophy: it reads structured text line by line, matches patterns against each record, and executes actions — making it trivially straightforward to write powerful one-liners that would require substantial programs in other languages. The “K” in AWK, like the “K” in K&R, stands for Kernighan. AWK remains in daily use on every UNIX and UNIX-like system nearly five decades after its creation. Kernighan published a second edition of The AWK Programming Language in 2023, having implemented full Unicode support in the language himself — in his eighties.

In 1984, Kernighan co-authored The Unix Programming Environment with Rob Pike — a book that did for UNIX what K&R had done for C: it codified and taught the philosophy, not just the mechanics. Its central thesis — that the power of UNIX comes from the relationships between programs rather than from any individual program — remains the most precise single-sentence description of the UNIX design aesthetic ever written, and is as true of OpenBSD today as it was of Research UNIX in 1984.

Kernighan also wrote influential criticism throughout this period. His 1981 paper “Why Pascal is Not My Favourite Programming Language” helped steer a generation of systems programmers away from Pascal and toward C. His Software Tools series with Bill Plauger demonstrated the UNIX philosophy applied to Fortran and other environments, spreading the thinking beyond Bell Labs to a much broader computing audience.


Bell Labs Distributes UNIX to Universities

When UNIX was formally presented to the outside world at the 1973 Symposium on Operating Systems Principles — where Ritchie and Thompson delivered the defining paper — it generated immediate and widespread interest. Universities wanted copies. The problem was a 1956 antitrust consent decree that forbade AT&T from entering any business other than telephone common carrier services, which meant Bell Labs could not sell UNIX as a commercial product.

So they gave it away. AT&T licensed UNIX to educational institutions at cost of media and postage. Ken Thompson reportedly mailed out tapes accompanied, according to legend, by notes signed “Love, Ken.” By 1975, Version 6 was available to universities under these loose terms. Critically, these licenses granted access to the full source code.

This was transformative. A generation of computer science students and researchers gained access to a real, working, elegant operating system and could read every line of it. The K&R book — published in 1978, shortly after — meant they could read and understand the C it was written in. Kernighan’s documentation and teaching efforts and Thompson and Ritchie’s openness with source effectively educated an entire generation of systems programmers simultaneously.


Berkeley and the Birth of BSD

In 1975, Ken Thompson took a sabbatical from Bell Labs and went to teach at the University of California, Berkeley. He taught UNIX. When he returned to Bell Labs, the Berkeley students and faculty kept going.

Berkeley’s Computer Systems Research Group (CSRG) began modifying, extending, and improving UNIX — adding virtual memory support, a more capable C shell, and eventually, in collaboration with DARPA, the entire TCP/IP networking stack that would become the backbone of the internet. These enhancements were collected and distributed as the Berkeley Software Distribution, or BSD. The Bell Labs toolchain — AWK, the troff suite, and the broader ecosystem — had by this point spread into the standard UNIX environment that BSD inherited and built upon.

BSD is not a UNIX derivative in the sense of “inspired by” or “similar to.” BSD was UNIX — the same codebase, evolved. It was a direct, unbroken lineage from AT&T’s original system. By the late 1980s, however, years of careful work by Berkeley’s CSRG meant that the proportion of original AT&T code remaining in BSD had shrunk dramatically. Berkeley systematically replaced AT&T code with independently-written equivalents.

In 1988, NET/1 was released under the BSD license — a freely distributable TCP/IP networking implementation, clean of AT&T code. In June 1991, after an intensive audit to strip out all remaining AT&T intellectual property, Berkeley released NET/2: a nearly complete UNIX-like operating system that the CSRG believed to be entirely free of AT&T copyright.

For a brief and exciting moment, it looked like the free world was about to have a complete, freely distributable UNIX.


The USL Lawsuit: How AT&T’s Lawyers Had Different Plans

AT&T, by this point, had restructured. Its UNIX business had been spun off in April 1991 into a subsidiary called UNIX System Laboratories (USL). USL’s purpose was to build a commercial market for UNIX — specifically its System V product line.

A company called Berkeley Software Design, Inc. (BSDi) had licensed NET/2 from Berkeley and was selling a polished, complete UNIX system for Intel 386 machines — marketed through the audacious phone number 1-800-ITS-UNIX — for $995. A comparable AT&T license cost $20,000. USL was not amused.

In April 1992, USL filed suit against BSDi in New Jersey federal court, alleging copyright infringement and misappropriation of trade secrets. The lawsuit was later amended to also target the Regents of the University of California directly.

The counterattack from Berkeley was swift and pointed. UC’s lawyers discovered that USL’s own System V product contained BSD code — code for which Berkeley had never received the contractually required copyright credits. The University filed a countersuit in California, demanding that USL reprint all its documentation, notify all licensees, and take out full-page advertisements in the Wall Street Journal and Fortune magazine acknowledging the omission.

The case dragged on. Distribution of NET/2 was effectively halted. The legal battle was enormous — nobody wanted to build on BSD code while its legal status was uncertain.

In July 1993, USL was purchased from AT&T by Novell. Novell’s CEO Ray Noorda famously stated he would rather compete in the marketplace than in the courts. Settlement talks began. The lawsuit was settled in February 1994, largely in Berkeley’s favour. From the 18,000 files in the BSD distribution, only three needed to be removed and 70 required the addition of USL copyright notices. A new release, 4.4BSD-Lite, was prepared and freed from all encumbrance.

BSD had won. But the victory had taken two years — two years during which BSD development had stalled, contributors had scattered, and a legal battle had poisoned the ecosystem.


GNU: The Userland Without a Kernel

While the UNIX world was fighting its legal battles, a parallel effort had been underway for nearly a decade.

In 1983, Richard Stallman — a programmer at MIT — launched the GNU Project with an ambitious and idealistic goal: to create a complete, free (as in freedom) UNIX-compatible operating system. Stallman founded the Free Software Foundation, wrote the GPL license, and began assembling an ecosystem of tools: gcc, bash, make, glibc, emacs, and dozens of others — high-quality, production-ready reimplementations of UNIX utilities. Several of these were direct reimplementations of Bell Labs originals: GNU’s gawk, for instance, was a reimplementation of Kernighan, Aho, and Weinberger’s AWK, itself a testament to how central those Bell Labs tools had arrived in the UNIX ecosystem.

By 1991, the GNU Project had produced nearly every component required for a functional operating system. The critical missing piece was a kernel. GNU had begun work on a kernel called the Hurd in 1990, but it progressed slowly and remained unsuitable for general use.

GNU was a userland in search of a kernel.


Linus Torvalds Fills the Gap

In 1991, Linus Torvalds was a 21-year-old computer science student at the University of Helsinki, Finland. He had purchased an Intel 386-based PC in January of that year, briefly ran DOS on it, and then received a copy of MINIX — a small, educational UNIX-like system written by professor Andrew Tanenbaum — and found its limitations frustrating.

Torvalds began writing his own kernel, initially just to understand his hardware and to implement POSIX-compatible system calls. On August 25, 1991, he posted an announcement to the comp.os.minix newsgroup describing his project in famously understated terms: a “free operating system (just a hobby, won’t be big and professional like gnu).”

Version 0.01 was uploaded to a Finnish university FTP server on September 17, 1991. The first official version, 0.02, followed on October 5, 1991. Torvalds had wanted to call the kernel “Freax” — a portmanteau of “free,” “freak,” and “x” (for UNIX). The FTP server administrator, Ari Lemmke, found this unacceptable and named the directory “linux” without consulting Torvalds. The name stuck.

In January 1992, Torvalds re-licensed the kernel under the GNU General Public License v2, making it compatible with GNU’s ecosystem. The GNU userland now had a kernel; the Linux kernel now had a complete set of utilities. The combination — correctly called GNU/Linux, though the “GNU/” is rarely acknowledged — became a complete operating system.

Torvalds himself later acknowledged the irony of the whole thing. In 1993, he told Meta Magazine: “If 386BSD had been available when I started on Linux, Linux would probably never have happened.”

The BSD lawsuit had cleared the playing field.


The Fundamental Difference: Descendant vs. Clone

BSD is a direct descendant of UNIX. Although it has evolved over the years into various different BSD systems — FreeBSD, NetBSD, OpenBSD, and DragonFly BSD - the ancestor from which all derivatives were derived from is AT&T UNIX.

Linux is not a descendant of UNIX. Instead Linux can be thought of as a UNIX clone. The Linux kernel and the GNU userland were joined together because they were available and they worked. They were not designed together.

This implementation has several consequences. Linux has accumulated decades of complexity, vendor blobs, and in-kernel frameworks that reflect its orgins as a community project accepting contributions from thousands of sources with varying incentives and varying quality standards. The GNU userland also has it’s own separate history. Both kernel and GNU having had many maintainers, many projects, and separate release cycles. The result is a system that feels cobbled together. In summary, Linux has gotten fat and sloppy. I recall the days when you could spend 5 minutes on a Linux kernel config and hours upon hours compiling it. These days you spend hours on a fresh config if you were to manually go through the options and a few minutes compiling it. Linux has included so much stuff in the kernel it’s not even funny. Combine this with systemd and other garbageware and you have a system which cannot be correct or secure.

The BSDs by contrast are the product of institutional thinking. The kernel and userland tools are developed by the same project.

OpenBSD Continues the UNIX heritage: Theo de Raadt forked NetBSD in 1995 and built the best BSD. While no system is 100% perfect, OpenBSD does the right thing most of the time. The OpenBSD project emphasizes portability, standardization, correctness, proactive security, and integrated cryptography.


Timeline Summary

Year Event
~1964 Multics project begins (MIT, Bell Labs, GE)
1969 Bell Labs withdraws from Multics; Thompson begins UNIX on PDP-7; Kernighan joins Bell Labs
1970 System named “Unics” (later “Unix”) by Kernighan; PDP-11 ordered
1972 Kernighan writes first “Hello, world!” program in B language tutorial
1973 UNIX v4 rewritten in C; publicly presented at SOSP; Kernighan writes ditroff
1974 Kernighan and Cherry publish eqn typesetting language
1975 Thompson sabbatical at Berkeley; UNIX v6 licensed to universities
1977 AWK created by Aho, Weinberger, and Kernighan
1978 First BSD release (1BSD) from Berkeley; K&R The C Programming Language published
1981 Kernighan publishes “Why Pascal is Not My Favourite Programming Language”
1983 Stallman launches GNU Project; Thompson & Ritchie win Turing Award
1984 Kernighan and Pike publish The Unix Programming Environment
1988 BSD NET/1 released; TCP/IP stack freely available; K&R second edition (ANSI C)
1991 (Apr) USL spun off from AT&T
1991 (Jun) NET/2 released — nearly complete free UNIX
1991 (Aug) Torvalds announces Linux kernel publicly
1991 (Sep) Linux 0.01 uploaded to Finnish FTP server
1992 (Jan) Linux relicensed under GPL v2
1992 (Apr) USL files suit against BSDi and UC Berkeley
1993 BSD development effectively stalled; Linux fills the vacuum
1994 (Feb) Lawsuit settled; 4.4BSD-Lite released unencumbered
1993–1994 FreeBSD and NetBSD founded from BSD codebase
1995 OpenBSD forked from NetBSD by Theo de Raadt
2000 Kernighan joins Princeton faculty
2019 Kernighan publishes UNIX: A History and a Memoir
2023 Kernighan publishes second edition of The AWK Programming Language

Notes On Legacy

It is worth quoting Dennis Ritchie himself on Linux. In a 1999 interview, he said: “I think the Linux phenomenon is quite delightful, because it draws so strongly on the basis that Unix provided.” He viewed Linux as part of the broader family, even if not a direct descendant.

As for Kernighan — he is still at it. He joined the Princeton faculty in 2000, where he continues to teach computing to non-majors. He added Unicode support to AWK in his eighties and published a new edition of the AWK book in 2023. He published UNIX: A History and a Memoir in 2019, typeset — as always — entirely by himself using the tools he helped build. He has been producing camera-ready copy from plain text source files for over fifty years.

Ken Thompson built the first UNIX in a summer, essentially alone, on a machine nobody else wanted. Dennis Ritchie gave it a language worthy of UNIX. Brian Kernighan named it, documented it, tooled it, and taught it to the world. The Berkeley students turned it into something the entire internet runs on.


Filed under: history, unix, bsd, openbsd