Lesson 1 of 7 · History
From Multics to UNIX (1964-1973)
Objective
Understand how UNIX, the ancestor of Linux, was born, and why its creators' ideas, more than fifty years old, still explain the way you will work on a Linux server today.
Key points
- Multics (started in 1964) was a very ambitious operating system project; AT&T's Bell Labs withdrew from it in 1969.
- That same year, Ken Thompson wrote a small system on a PDP-7 computer: this was the beginning of UNIX.
- Dennis Ritchie created the C language; in 1973, the core of UNIX was rewritten in C, which made it portable from one machine to another.
- Pipes (
|) arrived in 1973: you combine small programs to do big things. - The UNIX philosophy — "a program does one thing and does it well", "everything is a file", "text as the common language" — is still at the heart of Linux.
1. The context: computers the size of a room
In the early 1960s, a computer filled an entire room, cost millions and served only one person at a time. You prepared your program on punched cards, handed them in at the counter, and came back for the result… the next day. One missing comma, and the day was lost.
The idea that excited researchers at the time was called time-sharing: the computer switches very quickly from one user to the next, so quickly that everyone feels they have the machine to themselves, at their own terminal.
This is exactly what a Linux server still does: dozens of people and hundreds of programs use it "at the same time". When you type who or ps in this course, you will see the direct legacy of this idea.
2. Multics: the big project that disappointed (1964-1969)
In 1964, three partners launched Multics (Multiplexed Information and Computing Service):
| Partner | Role |
|---|---|
| MIT (Project MAC) | University research |
| General Electric | The hardware (the GE-645 computer) |
| Bell Labs | The research laboratory of AT&T, the American telephone company |
Multics wanted to do everything: serve hundreds of users, protect every file, run without ever stopping, like the power grid. Several of its ideas were excellent: a directory tree, access rights on files, a command interpreter that is a program like any other.
But the project fell behind schedule and became heavy and expensive. In 1969, Bell Labs decided to withdraw. Multics continued elsewhere (the last Multics system in service was shut down in 2000), but the Bell Labs researchers found themselves without a project… and with their heads full of good ideas.
3. 1969: Ken Thompson and the PDP-7
Ken Thompson wanted to keep working on a system of his own. He picked up a PDP-7 from the company DEC, a minicomputer that was already outdated at the time and was sitting unused in a corner of the laboratory.
It is often said that Thompson also wanted to run a game he had written on it, Space Travel, a simulation of the solar system. For that, he needed a file system, a way to launch programs, an editor and a command interpreter. In the summer of 1969, he wrote all of this in a few weeks, in assembly language.
He was soon joined by Dennis Ritchie, then by other colleagues: Doug McIlroy, Joe Ossanna, Brian Kernighan…
Where does the name come from? A colleague (usually credited as Brian Kernighan) suggested "Unics", a nod to Multics: where Multics wanted to do everything in "multi", this small system did things simply. The spelling became UNIX.
A detail that will be useful to you: UNIX and Linux systems count time in seconds since 1 January 1970 at 00:00 (UTC), a date chosen at that time. It is called the "UNIX epoch". Try
date +%s: the large number displayed is the number of seconds elapsed since that day.
4. From the PDP-7 to the PDP-11: UNIX finds its place (1970-1972)
To get a more powerful computer, the team made a promise to management: to write a text-processing system for AT&T's patent department. In 1970-1971, UNIX moved to a PDP-11, a much more common computer. The patent department became the first "customer" of UNIX.
In November 1971, the first UNIX manual was published (the First Edition). The following editions came out every few months. The format of this manual — one page per command, with NAME, SYNOPSIS, DESCRIPTION — is the format of the man pages you will read on Linux.
5. The C language: the decision that changed everything (1972-1973)
At the time, an operating system was written in assembly language, the language specific to each processor model. As a result, a system written for the PDP-7 worked only on the PDP-7. Changing computers meant rewriting everything.
The lineage of the C language looks like a family tree:
BCPL (Martin Richards, Cambridge, 1966-1967)
└── B (Ken Thompson, 1969-1970) — simplified version of BCPL
└── C (Dennis Ritchie, 1971-1973) — B enriched with data types
Ritchie created C in the early 1970s. It is close enough to the machine to write a system, but general enough to be compiled on other processors.
In 1973, the team rewrote the UNIX kernel in C (the Fourth Edition, November 1973). It was a first at this scale: only a small part remained in assembly language. From then on, porting UNIX to a new computer mostly meant writing a C compiler for that machine.
This decision explains why Linux runs today just as well on an Intel server, an ARM phone or a supercomputer: its kernel, too, is written mainly in C.
In 1978, Kernighan and Ritchie published The C Programming Language, the reference book that programmers still call "K&R".
6. Pipes: Doug McIlroy's idea (1973)
Doug McIlroy, the head of the team, had been asking for years for a way to connect programs to one another, like garden hoses. Thompson implemented it in one night, in 1973 (Third Edition): this is the pipe, written |.
Example: you want to know how many users on your server use the bash shell.
# Without a pipe, you would need a special program for this specific question.
# With a pipe, you combine three small tools:
cat /etc/passwd | grep bash | wc -l
# cat : reads the accounts file
# grep : keeps the lines that contain "bash"
# wc -l: counts the remaining lines
None of these three programs was written to answer this question. Together, they answer it. That is the whole strength of UNIX.
7. The UNIX philosophy, in four rules
These principles were summarised later by McIlroy and others; they remain the best compass for understanding Linux.
| Principle | What it means | Example on Linux |
|---|---|---|
| A program does one thing, and does it well | Small, specialised tools rather than one giant piece of software | ls lists, sort sorts, grep searches |
| Programs work together | The output of one becomes the input of another | ps aux | grep httpd |
| Text is the common language | Configuration and exchanges in readable text | /etc/passwd, /etc/hosts, log files |
| Everything is a file | Disks, terminals, kernel information: you read and write them like files | /dev/sda, /proc/version, /proc/cpuinfo |
cat /proc/cpuinfo # the processor, presented as a simple text file
cat /proc/version # the kernel version, same idea
ls -l /dev/null # a special "file" that swallows everything you send to it
For the administrator, the consequence is very concrete: almost everything is configured by editing text files, and almost everything is diagnosed by reading text files. No graphical tools needed.
8. 1973-1974: UNIX leaves the laboratory
In October 1973, Ritchie and Thompson presented UNIX at an academic conference on operating systems (SOSP). The paper was published in July 1974 in the journal Communications of the ACM. Universities discovered this elegant system and asked to try it.
However, because of an antitrust agreement signed in 1956 with the US government, AT&T was not allowed to do business in computing. So it distributed UNIX to universities for a nominal fee, with the source code. Thousands of students would study it, modify it and improve it. This is the starting point of the next lesson: the large UNIX family.
In 1983, Thompson and Ritchie received the Turing Award, the equivalent of the Nobel Prize in computer science, for UNIX. Dennis Ritchie died in October 2011; Ken Thompson later took part, at Google, in creating the Go language.
9. The lesson timeline
1964 Launch of Multics (MIT, General Electric, Bell Labs)
1969 Bell Labs leave Multics — Thompson writes UNIX on a PDP-7
1970 Move to the PDP-11 — the name "UNIX" takes hold
1971 First UNIX manual (First Edition, November)
1972 Birth of the C language (Dennis Ritchie)
1973 Pipes "|" — the kernel rewritten in C (Fourth Edition)
1974 Paper in Communications of the ACM: UNIX becomes known
1983 Turing Award for Thompson and Ritchie
Common misconceptions
- "UNIX was designed by a large company to be sold." No: it was a project of two researchers, almost clandestine at first, on a salvaged machine. AT&T was not even allowed to sell it.
- "Linux is a version of UNIX." Not exactly. Linux resembles UNIX and follows its rules, but it contains not a single line of code from UNIX: it was rewritten from scratch (lesson 0.4).
- "Everything is a file" means everything is stored on the disk. No:
/proc/versiondoes not exist on the disk. The kernel generates it on the fly when you read it. It is the way you access it that is the way you access a file. - "C is an old, abandoned language." The Linux kernel, most of the basic tools, and databases such as PostgreSQL are written in C. It remains one of the most widely used languages in the world.
Lab
Your first machine is waiting for you in the terminal, running Rocky Linux 9. You will make it talk, using the habits inherited from UNIX:
uname -s # the name of the system
cat /proc/version # "everything is a file": the kernel describes itself in a file
cat /etc/os-release # the identity card of the distribution
cat /etc/os-release | wc -l # a pipe: read, then count
Complete the tasks: save the name of the system, copy the kernel description, count lines with a pipe, and find the year UNIX was born. Then click Check: the site checks your work automatically.
Quiz
- What were the three organisations behind Multics?
- On which computer did Ken Thompson write the first version of UNIX, and in what year?
- Why was rewriting the UNIX kernel in C (1973) decisive?
- What does the command
cat /etc/passwd | grep bash | wc -ldo, and which UNIX principle does it illustrate? - Why did AT&T distribute UNIX to universities instead of selling it?
Answers
- MIT, General Electric and Bell Labs (AT&T).
- On a DEC PDP-7, in 1969.
- Written in C, UNIX became portable: to run it on another machine, you essentially needed only a C compiler, instead of rewriting everything in assembly language.
- It counts the system accounts whose line contains "bash". It illustrates combining small specialised programs connected by pipes.
- A 1956 antitrust agreement prohibited AT&T from doing business in computing; so it distributed UNIX for a nominal fee, with its source code.
Reference sources: papers by D. M. Ritchie and K. Thompson cited in the header, Debian Reference (free licence). Original MasterLinux text.