There are lots of people who enjoy the opportunity to experience what it was like to work on early Unix systems. That’s been possible for a long time. Indeed, there’s a cottage industry of experimenters who have built PDP emulators, resurrected early Unix sources, and gotten the original systems running. If you’re interested in that sort of thing, take a look at the Unix Heritage Society and its news list.
The problem is that it’s a lot of work even if you’re using the software that others have already written. Much too much work for those of us with a merely casual interest in trying out one of the historical Unix systems. Fortunately, Russ Cox has solved that problem for us.
Cox has ported Unix v6 to Go, written a PDP-11 emulator, compiled the whole thing to Web Assembly and put up a site that allows you to run the emulator and Unix v6 in your browser. Just follow the link and try it out. You can log in as dmr
, ken
, or root
. Be warned, though, it can suck up a lot of your time.
Cox has a Github repository with all the code for the emulator and ported v6 OS. The userland stuff is the original C versions from various Unix archives so you’re running the original Unix software. If you login as ken
you will find the code for Thompson’s famous compiler hack that I wrote about previously. Presumably you can compile it as described in Cox’s post about the hack and try running it on the emulator.
It won’t be quite the same experience of those who have somehow acquired and restored an old PDP-11 and are running v6 on it but it will give you the flavor and, if nothing else, make you realize how easy us kids have it today.
Afterword
This is the third and final post in the Ken Thompson/Old Unix triptych. If, after yesterday’s post, you have an itch to try out ed
, Cox’s V6 emulator is a great place because you’ll be working in the original environment and, in any case, it’s the only editor available.