Published in News

Unix v4 clawed back from a 1970s tape

by on24 December 2025


50-odd years later, the bits still had teeth.

Computer History Museum software curator Al Kossow has pulled the contents from a more than half-century-old tape found at the University of Utah last month and recreated Unix v4, the first version in which the kernel was written in the then-new C programming language.

Kossow recovered the code from a 1970s nine-track tape, and it can be downloaded from the Internet Archive and run in SimH.

Unix v4 was not very large, and the kernel was about 27 kB of code, smaller than the average web cookie banner. The codebase is tiny, with about 55,000 lines, about 25,000 in C and less than 1,000 lines of comments.

That tracks with the culture, and the late Dennis Ritchie and co-creator Ken Thompson were absolutely the sort who would rather write code than explain it. As the ancient wisdom puts it: “Real Programmers don't need comments – the code is obvious.”

Thompson is still active and recently did his second oral history interview with the Computer History Museum, titled A Computing Legend Speaks.

The first Unix, later called the “Zeroth edition”, was hand-coded in assembly by Thompson in 1969 for a spare PDP-7 at Bell Labs. The PDP-7 was an 18-bit machine, and this was so early that the eight-bit byte was not yet standardised. That PDP-7 Unix was reconstructed from printouts between 2016 and 2019, which is dedication bordering on witchcraft.

A few years later, Thompson got access to a PDP-11 and rewrote the OS for the 16-bit machine, still in assembly, to create Unix First Edition. At first, the machine had a single RS11 hard disk with half a megabyte of storage, although the rebuilt source is from a later box with a second disk.

Unix v2 followed later the same year on a PDP-11/20, and earlier this year, something like a beta of Unix v2 was reconstructed. Unix v3 arrived in 1972 and introduced pipes, and it was also the version where the then-new C programming language was first written.

Now the long-lost Unix v4 has been recovered, and it was the first version in which much of the kernel was rewritten in C. Unix v4 ran only on the higher-end PDP-11, the PDP-11/45.

Version 6 leaked out and became the basis of the Lions book, which preserved probably the most famous code comment ever:

"If the new process paused because it was swapped out, set the stack level to the last call to savu(u_ssav). This means that the return, which is executed immediately after the call to aretu, actually returns from the last routine which did the savu.

You are not expected to understand this."

Ahh old Unix jokes. "Unix: can’t live with it, can’t live without it. If you understood it, it would be broken."

Unix v7 did the real damage, going viral and spawning descendants, offshoots and rewrites across industry and academia. Now it is a bloated mess millions of times bigger than the little system that started it.

Rate this item
(0 votes)