Chapter 4 · 1969–1979
The leak
AT&T wasn't allowed to sell software. So the most important program ever written left the building as a stack of tapes, nearly free, source code included.
- Ken Thompson (United States) — Wanted to keep playing the space game he'd written for a project that had just been cancelled.
- Dennis Ritchie (United States) — Building a language just sturdy enough to move an operating system between machines.
- Doug McIlroy (United States) — Spent four years nagging his own department to let programs pour output into each other like garden hoses.
- John Lions (Australia) — Annotated an operating system's source code for his students, line by line, and accidentally wrote a banned book.
In the spring of 1969, Bell Labs walked away from the most ambitious computing project of the decade. It was called Multics — a plan, shared with MIT and General Electric, to build a computer system an entire city could plug into, the way a city plugs into the power grid. Five years in, Multics was late, over budget, and collapsing under its own ambition. Bell Labs pulled out.
Which left Ken Thompson with a problem. Thompson was a young engineer who had spent those years on Multics, and somewhere along the way he had written a game for it: Space Travel, a little simulator that let you fly a ship around the solar system and try to land on its moons. When Multics died, the game lost its home. And so — this is really how it happened — one of the most consequential engineering efforts of the twentieth century began with a man wandering his building looking for a computer to play a game on.
He found one: a PDP-7, a small machine by the standards of the day, sitting idle in a corner. Thompson moved his game onto it. But the PDP-7 was bare — no real software to speak of, nothing to organize its disk. So he started building what was missing. First a filesystem, a scheme for turning the disk’s raw storage into named files. Then, in the summer of 1969, while his wife took their one-year-old to California for a month, he gave himself one week each for the four missing pieces: the kernel, the command reader, an editor, and an assembler. Four weeks later the PDP-7 had a tiny, working operating system.
Someone in the group, riffing on the giant thing that had just failed, called the little thing Unix — the joke being that where Multics did everything, Unix did one thing. The name stuck.
Dennis Ritchie joined from the start — a quieter figure, Thompson’s complement, and the one thinking hardest about a different problem: the system was written in assembly, the machine’s own private language, which meant it was married to the PDP-7. Ritchie built a new language, plain and fast and just abstract enough, so that the system could be rewritten in something a compiler could translate for any machine. He called it C — that story is the next chapter’s — and by 1973 Unix itself was rewritten in it. An operating system that could pack its bags and move: nobody had really had one before.
The third figure took the longest to get his way. Doug McIlroy, who ran the department, had been pushing one idea for four years: programs should connect like garden hoses — screw the output of one onto the input of the next, and let the data flow through. In 1972 Thompson finally gave in and added it in a day. The result was the pipe, and it changed how the whole group wrote software overnight. Instead of building big programs that did everything, you built small ones that each did one thing well, and chained them. Try it yourself below — this page has a gentle imitation of the real thing.
All of this happened in and around one room — 1127, the Computing Science Research Center, a hallway of offices and a shared terminal room where the whole cast drank coffee from the same pot. Bell Labs’ patient money paid for it. Nobody upstairs asked what it was for.
Then the walls of the 1956 consent decree did something nobody planned. AT&T was barred from selling anything outside the phone business — and that included software. Unix was becoming famous; universities wanted it; and AT&T legally could not turn it into a product. So the lawyers settled on a shrug: ship it. For a few hundred dollars in media fees, a university got the tapes — and not just the program, but the source code, the actual human-readable text of the system. Officially there was no support, no warranty, no hotline. Tapes went out the door with a note that amounted to: good luck.
To a company, “no support” is a defect. To a graduate student, it’s an invitation. If nobody’s going to help you, you read the source. You fix it yourself. You mail your fix to the other universities running the same tapes. By the mid-1970s there was a community doing exactly that, from Berkeley to Sydney — arguably the first open-source community, formed not around an ideal but around an antitrust condition.
In Sydney, a professor named John Lions took it one step further. For his students, he printed the entire Unix kernel — about 9,000 lines — and annotated it line by line: here is a real operating system, and here is what every piece of it does. When AT&T’s licensing later tightened and the book could no longer be legally distributed, computer scientists simply photocopied it, hand to hand, generation to generation, like a banned novel. It is probably the most photocopied document in the history of computing.
One more thing shipped in those years, and almost nobody noticed. Version 7 of Unix, in 1979, quietly included chroot — a way to fence a program into one corner of the filesystem, so that it could see only its own little world. Built as a testing convenience. A footnote. Remember it: thirty-five years later, that footnote — grown up and renamed — would be how nearly every piece of software on the internet gets shipped.
The leak was complete. The transistor had escaped through the decree’s first wall in 1956; now Unix had escaped through the second. Neither escape was anyone’s plan. Both were about to be worth more than the company they escaped from.
Try the pipe
Two tiny programs: shout makes text uppercase, mirror reverses it. The | pours one program's output into the next. Type a word and watch it flow.