News: 1766491689

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

UNIX V4 tape successfully recovered: First ever version of UNIX written in C is running again

(2025/12/23)


Computer History Museum software curator Al Kossow has successfully retrieved the contents of the over-half-a-century old tape found at the University of Utah last month.

UNIX V4, the first ever version of the UNIX operating system in which the kernel was written in the then-new C programming language, has been [1]successfully recovered from a 1970s nine-track tape drive. You can [2]download it from the Internet Archive, and run it in [3]SimH . On Mastodon, [4]"Flexion" posted a [5]screenshot of it running under SGI IRIX .

Last month, we wrote about the remarkable discovery of a [6]forgotten tape with a lost early version of Unix , found by Professor Robert Ricci at the Kahlert School of Computing at the University of Utah. At the time, we quoted the redoubtable Kossow, who also runs [7]Bitsavers , as saying that it "has a pretty good chance of being recoverable." Well, he was right, and at the end of last week, he did it. Ricci also [8]shared a video clip on Mastodon.

[9]

There's a video of the recovery here. It's only slightly over five minutes long, but then, UNIX V4 wasn't very big yet: for instance, the kernel was some 27 kB of code.

[10]

[11]

The data was recovered using the [12]readtape program by the Computer History Museum's [13]Len Shustek . Since few of us in the microcomputer world deal with magtapes much, the [14]Greaseweazle tool for archiving old floppy tapes might be a more familiar comparison: rather than trying to copy the bytes or sectors from media – in other words, the processed digital data – both readtape and Greaseweazle sample and record the raw magnetic flux variations. Those can then be used to reconstruct the digital data, making some error recovery possible. In this case, only two blocks wouldn't read properly and there was enough to reconstruct their contents.

[15]

So, in the [16]recovered files on the Internet Archive, you can see there's a 1.6 gigabyte file created from a tape that only held 40 MB or so of data. You probably don't want to download that.

Fortunately, Angelo Papenhoff [17]offers a processed version , complete with a README telling you how to run it. For further guidance, then on Reddit, [18]drop_table_allusers suggests :

In the directory where you downloaded all the Unix v4 files, start SimH pdp-11 executable and pass the boot.ini found in the Unix v4 files as parameter. Then press 'k', type 'unix', press enter and it boots…

It's very small: it [19]contains around 55,000 lines of code, of which about 25,000 lines are in C, with under 1,000 lines of comments. But then, the [20]late Dennis M. Ritchie and [21]co-creator Ken Thompson were very definitely Real Programmers, and as is [22]recorded in ancient wisdom :

Real Programmers don't need comments – the code is obvious.

Thompson is still active, and recently did his second oral history interview with the CHM, aptly titled [23]A Computing Legend Speaks .

We've seen a lot of misunderstanding of this and what it represents online, so we'll try to set it in some kind of context.

The [24]very first version of Unix , later known as the "Zeroth edition", was hand-coded in assembly language by Thompson in 1969. He wrote it for a spare [25]PDP-7 at Bell Labs, a [26]Digital Equipment Corporation minicomputer from 1965. The PDP-7 was an 18-bit machine: it handled memory in 18-bit words. This was so long ago that things like the eight-bit byte had not yet been standardized. PDP-7 UNIX was [27]reconstructed from printouts between 2016 and 2019.

[28]

It did well enough that a few years later, Thompson got his hands on a [29]PDP-11 . Thompson rewrote his OS for this 16-bit machine – still in assembly language – to create [30]UNIX First Edition . At first, the machine had a single [31]RS11 hard disk, for a grand total of half a megabyte of storage, although the [32]rebuilt source code is from a later machine with a second hard disk.

[33]

UNIX V4 in all its miniscule glory, running inside SimH on macOS 12. - Click to enlarge

It was followed later the same year by [34]UNIX v2 , still on a PDP-11/20. As we [35]reported earlier this year , something like a beta version of UNIX V2 has recently been reconstructed.

[36]UNIX V3 followed in 1972, which introduced the new feature of [37]pipes . This was the version on which the then-new [38]C programming language was first written.

Now, the long-lost [39]UNIX V4 has been found and its files recovered. This was the first version where much of the kernel was rewritten in C. UNIX V4 only ran on a higher-end model of PDP-11, the [40]PDP-11/45 .

These days, the nature and evolution of UNIX in its early stages is not well understood. For instance, some things happened simply because Ken and Dennis were working on very limited hardware. At one point, they had a single [41]DEC RK05 hard disk, which held a massive 1.5 MB. When they got access to a second hard drive, they moved all the home directories to it. These were held in /usr – it was short for "users," and it contained the home directories of both ken and dmr , meaning that it also contained most of the binary files – the actual programs constituting the OS itself. This caused them a problem: how do you mount the second hard disk when the mount command itself is on that disk? The solution: a special /sbin directory on the first hard disk which contained tools needed to, among other things, access any additional hard disks.

Rob Landley wrote an excellent explanation of the history of the split on the Busybox mailing list 15 years ago: [42]Understanding the bin, sbin, usr/bin , usr/sbin split . Landley knows his stuff: he's the author of [43]Toybox , which is a replacement for Bruce Perens's [44]BusyBox multi-command binary – as used in Alpine Linux.

Today, it's part of Unix lore that there's an important functional distinction between the binaries in the root directory ( /bin , /sbin , /lib and so on) and those kept under the /usr tree ( /usr/bin , /usr/sbin , /usr/lib and so on). Trying to reconcile this split is a process called [45]the usr merge , and amusingly, the [46]latest Alpine Linux 3.23 has not yet completed it, although it [47]was planned to .

UNIX started out as a quick hack by two geniuses in their spare time, so that they could use a [48]spare computer – an extremely rare thing in the 1960s – to play a videogame one of them had written: [49]SPACEWAR , a version of Computer Space, [50]the first ever commercial video game .

The project they were working on for their day jobs, the [51]MULTICS operating system , became unfairly famous for being huge and over complicated. In fact, it was used for years, and is missed by its [52]former users .

Those two geniuses, Ken and Dennis, wrote something tiny and simple, and in keeping with that, they used tiny cryptic abbreviations and very short file and directory names. Their colleague, the [53]great Brian Kernighan – the "K" in "K&R C" and "AWK" – even [54]suggested the name UNICS as a joke .

The problem is that this tiny, experimental OS escaped the lab. [55]Version 6 got out and became the basis of the famous [56]Lions book , the source of probably the most famous code comment of all time: /*

* 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.

*/

(It's at line 2238 in the [57]annotated source code , if you're curious. The comment itself [58]inspired a book .)

[59]Unix V7 is the one that did the real damage: it went viral and its descendants, offshoots, and rewrites were widely adopted by industry and academia.

[60]52-year-old data tape could contain only known copy of UNIX V4

[61]The elusive goal of Unix – or Linux – simplicity

[62]Beta of Unix version 2 restored to life

[63]The Unix Epochalypse might be sooner than you think

Now, it has grown into a bloated mess millions of times bigger than the OS which inspired it. Those jokey cryptic filenames in cryptic folders are now enshrined as holy writ, and the people maintaining the systems have forgotten their origins.

Meanwhile, the original developers kept working away, improving it and refactoring it and simplifying the design, all the way up to the [64]Tenth Edition – then, it was radically rewritten to become the network-aware [65]Plan 9 from Bell Labs . Today, work on that continues as 9front, which [66]we've written about , including [67]its place in history .

Now, though, a crucial early evolutionary step has been found, imaged, and works. It's almost as if it were a Christmas miracle! ®

Get our [68]Tech Resources



[1] https://discuss.systems/@ricci/115747843169814700

[2] https://archive.org/details/utah_unix_v4_raw

[3] https://simh.trailing-edge.com/

[4] https://oldbytes.space/@flexion

[5] https://social.vivaldi.net/@flexion@oldbytes.space/115752574131771379

[6] https://www.theregister.com/2025/11/07/unix_fourth_edition_tape_rediscovered/

[7] https://bitsavers.org/

[8] https://discuss.systems/@ricci/115747969488009267

[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/storage&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2aUrKrqjWe42KKeGUy_8oRAAAAZg&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/storage&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aUrKrqjWe42KKeGUy_8oRAAAAZg&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[11] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/storage&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aUrKrqjWe42KKeGUy_8oRAAAAZg&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[12] https://github.com/LenShustek/readtape

[13] https://computerhistory.org/profile/leonard-j-shustek/

[14] https://github.com/keirf/greaseweazle

[15] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/storage&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aUrKrqjWe42KKeGUy_8oRAAAAZg&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[16] https://archive.org/details/utah_unix_v4_raw

[17] http://squoze.net/UNIX/v4/

[18] https://old.reddit.com/r/unix/comments/1ps555r/unix_v4_the_1st_version_rewritten_in_c_was/nv8g44q/

[19] https://lobste.rs/s/jflix6/unix_v4_tape_from_university_utah#c_vyhoug

[20] https://www.theregister.com/2011/10/13/dennis_ritchie/

[21] https://www.theregister.com/2023/03/17/ken_thompson_is_a_maccie/

[22] https://homepages.inf.ed.ac.uk/rni/papers/realprg.html

[23] https://computerhistory.org/blog/a-computing-legend-speaks/

[24] https://gunkies.org/wiki/PDP-7_UNIX

[25] https://gunkies.org/wiki/PDP-7

[26] https://www.theregister.com/2011/02/11/dec_hits_and_misses/

[27] https://www.theregister.com/2016/02/29/githubber_wants_to_revive_the_first_unix_in_a_pdp7_emulator/

[28] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_onprem/storage&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aUrKrqjWe42KKeGUy_8oRAAAAZg&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[29] https://gunkies.org/wiki/PDP-11

[30] https://gunkies.org/wiki/UNIX_First_Edition

[31] https://gunkies.org/wiki/RS11_disk_drive

[32] https://code.google.com/archive/p/unix-jun72/

[33] https://regmedia.co.uk/2025/12/22/unix-v4-simh.jpg

[34] https://gunkies.org/wiki/UNIX_Second_Edition

[35] https://www.theregister.com/2025/02/24/beta_unix_2_restored/

[36] https://gunkies.org/wiki/UNIX_Third_Edition

[37] https://wiki.osdev.org/Unix_Pipes

[38] https://gunkies.org/wiki/C_programming_language

[39] https://gunkies.org/wiki/UNIX_Fourth_Edition

[40] https://gunkies.org/wiki/PDP-11/45

[41] https://gunkies.org/wiki/RK05_disk_drive

[42] https://lists.busybox.net/pipermail/busybox/2010-December/074114.html

[43] https://en.wikipedia.org/wiki/Toybox

[44] https://en.wikipedia.org/wiki/BusyBox

[45] https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/

[46] https://www.theregister.com/2025/12/05/new_lts_kernel_and_alpine/

[47] https://alpinelinux.org/posts/2025-10-01-usr-merge.html

[48] https://bsdimp.blogspot.com/2019/10/video-footage-of-first-pdp-7-to-run-unix.html

[49] https://www.wheels.org/spacewar/

[50] https://www.theregister.com/2008/12/13/tob_computer_space/

[51] https://www.theregister.com/2007/11/14/multics_source_code_released/

[52] https://multicians.org/

[53] https://www.theregister.com/2022/08/23/universal_unix_tool_awk_gets/

[54] https://www.linuxjournal.com/article/7035

[55] https://gunkies.org/wiki/UNIX_Sixth_Edition

[56] https://gunkies.org/wiki/Lions_book

[57] https://warsus.github.io/lions-/

[58] https://dokumen.pub/quotyou-are-not-expected-to-understand-thisquot-how-26-lines-of-code-changed-the-world-9780691230818.html

[59] https://gunkies.org/wiki/Unix_Seventh_Edition

[60] https://www.theregister.com/2025/11/07/unix_fourth_edition_tape_rediscovered/

[61] https://www.theregister.com/2025/05/27/elusive_goal_of_simplicity/

[62] https://www.theregister.com/2025/02/24/beta_unix_2_restored/

[63] https://www.theregister.com/2025/08/23/the_unix_epochalypse_might_be/

[64] https://web.archive.org/web/20150203070035/http://www.cs.bell-labs.com/10thEdMan/

[65] https://9p.io/plan9/

[66] https://www.theregister.com/2022/11/02/plan_9_fork_9front/

[67] https://www.theregister.com/2024/02/21/successor_to_unix_plan_9/

[68] https://whitepapers.theregister.com/



Catch-the-Pigeon

it's a bit like finding an unfinished record by the beattes which belongs in the hall of fame , doesn't exist at the moment But Denis, Brian, Ken would be first in if it did.

Sam Shore

So is it the source code, or the binaries, or both?

Liam Proven

> So is it the source code, or the binaries, or both?

Both.

I link to analyses of the code, the comment ratio, etc. in the article -- so that means there is source, right? And I show a screenshot of it running, which means there are working binaries?

abend0c4

I'd say a mixture.

The kernel source is there (some C and some assembler) and the C compiler source and a Snobol III implementation in C. There appears to be a FORTRAN compiler that's binary only. There's assembler source for runoff. There are sources for the various commands in either C or assember: chmod is in C, for example while chown is assembler. There are some binary games.

Liam Proven

Thanks for the explanation.

I spent almost the whole day writing the article and trying to fit in background and context, then another hour or more getting it running (on a now-obsolete version of macOS). I did not have time to also dig into the emulated PDP-11, examine the filesystem and get into what's there or not.

abend0c4

You did the hard work - I just browsed the tarball!

The player is not compatible with your web browser

Gene Cash

TypeError this.player is null (followed by more that I can't copy/paste)

Nice.

Re: The player is not compatible with your web browser

Liam Proven

> The player is not compatible with your web browser

Sorry about that. It's a Peertube video. I wasn't sure if embedding would work -- it does on some OS/browser combinations.

Here's a [1]direct link :

https://exquisite.tube/w/qoHtHzpNXncHwrfqpx31tF

[1] https://exquisite.tube/w/qoHtHzpNXncHwrfqpx31tF

Martin J Hooper

So is Linux a direct descendant of this OS?

Cool that the tape has lasted so long without much degradation - Would like to see if there is a article or video on how they reconstructed the missing parts...

joeldillon

Define 'direct descendant'. Linux was written from scratch (despite what SCO were trying to say back in the day), it has no UNIX code in it. The BSDs originally did, albeit at long remove from this code, though removing anything AT&T copyrighted was part of the process of creating the ancestor to FreeBSD etc (despite what AT&T were trying to say back in the day).

R Soul

"So is Linux a direct descendant of this OS?"

Nah. It's a cancerous mutant.

Since Linux shares no DNA/source code with Unix, it can't be a direct descendant. IMO Linux also broke the design principles in UNIX a long time ago and that has further distanced it from the One True OS that Ken and Dennis started ~50 years ago.

UNIX started out as a riposte to a bloated, over-ambitious, all-singing, all-dancing OS that was called Multics. [It proved a simple, highly functional, well-designed OS could run on very modest hardware.] Today, the BSDs are a riposte to another bloated, over-ambitious, all-singing, all-dancing OS. How times have changed.

steelpillow

In his autobiographical account, Linus says that he had wanted to improve Minix - a UNIX variant/copy used for teaching computer science. But he wasn't allowed access to the IP protected source code, so he decided to brew up something like it for himself. He deliberately made his code compatible with the same shell commands, etc. and over time it got more like a full-blown re-engineered UNIX.

In due course the POSIX standard became a thing. Linus refused to comply with it over something or other, because he declared it to be "a broken standard". ISTR that POSIX eventually saw the wisdom of doing that particular thing his way, and adopted it. It is nowadays possible, with some fiddling, to put together a Linux distro that is POSIX compliant and legally entitled to badge itself a true UNIX. This has led certain Vultures to declare that Linux is now UNIX, somewhat missing the point that 99% of Linux builds are anything but.

I also sometimes wonder how much BSD UNIX code has been copy-pasted into Linux at some point or another, although the GPL forbids doing it the other way around.

So it's kinda like one of those incestuously tangled family trees of hereditary aristocrats and their retainers - how direct do you want the inheritance to be?

Wrong disk size

Duncan Macdonald

Removable RK05 disk drives had 2.4MB of storage not 1.5MB. (The fixed RK05F had twice the capacity - 4.8MB as it halved the track to track distance. This could be done as a disk cartridge would only be used in one drive so there was no need to allow for drive to drive variations.)

I remember using RK05 drives back in the late 1970s and early 1980s.

Now, it has grown into a bloated mess millions of times bigger than the OS which inspired it.

Gary Stewart

Just like Unix from the early days grew to become more useful over time so has the modern descendant called Linux and the more direct descendants BSDs. They are all much more powerful and useful than the originals and support a range of applications as well as the applications themselves and a vast array of hardware that the predecessors could only dream of. Yeah, there is bloat but the extra functionality, the complexity of modern computing and the cost of the equally complex algorithms that allow them to run efficiently (at least as far as the kernel is concerned) should not be underestimated. I will add that the size of a Linux kernel can vary greatly depending on the needs of the application from very small < 1 MiB for embedded systems to very large ~15 MiB for a full featured distribution.

Re: Now, it has grown into a bloated mess millions of times bigger than the OS which inspired it.

R Soul

Hmmmm. If someone put a TCP/IP stack and page-based virtual memory into V7 UNIX - BSD4.[234] comes close - it would kick the arse of any of today's monuments to bloatware^W^W^W Oses.

It's almost as if it were a Christmas miracle!

Neil Barnes

One of these --->

for Len Shustak, for recovering the data, and one for Liam for using the subjunctive mood; something rarely seen in computing.

/usr

Antron Argaiv

I have been told...take this for what it's worth...that "usr" stood for "Unix System Resources"

Re: /usr

MyffyW

I too was told that. Unfortunately it was about 20 years ago on the RHEL Engineer course, so I'm not absolutely convinced it's canon.

<Knghtbrd> you know, Linux needs a platform game starring Tux
<Knghtbrd> kinda Super Marioish, but with Tux and things like little cyber
bugs and borgs and that sort of thing ...
<Knghtbrd> And you have to jump past billgatus and hit the key to drop him
into the lava and then you see some guy that looks like a RMS
or someone say "Thank you for rescuing me Tux, but Linus
Torvalds is in another castle!"