16

This question already has an answer here:

Where can I get the original Unix (from the year 1969)? I would like to look at the source code of the original Unix.

marked as duplicate by Christopher, muru, Romeo Ninov, sourcejedi, Renan May 8 '18 at 0:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

21

The closest of the feeling of a contemporary system you can get freely in the Internet, and pretty much tested and ready to run, is a version 7 disk image running with the PDP-11 SimH emulator, and even a system III disk image with the actual C sources also with the PDP-11 emulation under SimH.

See my post with step-by-step instructions how to download and get running Unix version 7 after installing SimH. The original site has some inconsistencies: the original instructions are for an older SimH version, and are lacking some procedures needing to be done after booting:

Link to my answer in Retro Computing explaining how to boot the PDP-11 system 7 image disk

SimH runs in several architectures, including MacOS, DOS (I think) and Linux.

For installing SimH in Debian, the corresponding package is: simh

See https://packages.debian.org/jessie/otherosfs/simh

Package: simh (3.8.1-5)

Emulators for 33 different computers

This is the SIMH set of emulators for 33 different computers: DEC PDP-1, PDP-4, `PDP-7, PDP-8, PDP-9, DEC PDP-10, PDP-11...

To install then it in Debian:

sudo apt-get install simh

After installation, you will have a binary called pdp11 for emulating the PDP-11.

After this you can follow my answer, in the first link of this answer, in our sister site Retro computing, as it is oriented to the same SimH version.

As per the @user996142 comment, you can find nowadays the version 7 Unix source code tree at https://github.com/dspinellis/unix-history-repo

As an alternative, there is a port of V7 for x86/Intel. A VM for VmWare and VirtualBox can be downloaded here: http://www.nordier.com/v7x86/releases/v7x86-0.8a-vm.zip ; you boot the VM, login as "guest", run su and introduce the password "password". I think the main use for it is for teaching purposes.

More interestingly yet, is a System III disk image that was made from recovered tape(s), which can also be run under the PDP-11 emulator in SimH.

System III has much more kernel source code lines written in C, and more utilities. The system resembles a little more Unix as we know it today. The tape/disk image also comes with the source code tree, in /usr/local/src (have to check the directory), that can be read, changed and compiled inside the emulator, thus not obliging you to much effort trying to (re)building and modifying legacy code if you want to test out some modifications.

Obviously, the utilities are much smaller than nowadays, and such a system is much more easy to understand, rebuild and hack for pedagogic purposes.

The HOW-TO to use and build the System III image emulation for SimH is here http://mailman.trailing-edge.com/pipermail/simh/2009-May/002382.html ; however the download links do not work anymore; nonetheless I managed to find a working download link of the System III version here: https://unixarchive.tliquest.net/PDP-11/Distributions/usdl/SysIII/

PS. I built my working System III SimH PDP-11 emulation disk image from those files.

5

The 1969 version has been lost to history. But what would you want? The version on day 1? Day 200?

The closest thing original Unix had to releases were editions of the manual. The Unix 1st Edition manual was published in 1971, and that's the earliest code that's available. You can browse the source on the The Unix Heritage Society website. The 1st Edition source is in the Dennis_v1 directory.

There's also a Docker image that you can use to run Unix 1st Edition.

https://hub.docker.com/r/bahamat/unix-1st-ed/

  • I would also suggest looking at Lions' Commentary on UNIX 6th Edition link. The link gives you a pointer to the book plus were you can run an emulator. – doneal24 May 7 '18 at 19:25
  • The docker image is SimH and the image disk, but you should know that. – Rui F Ribeiro May 7 '18 at 19:38
  • @RuiFRibeiro Yes, of course I know that, I created the docker image. – bahamat May 8 '18 at 19:28
  • @bahamat I noticed, hence the comment. ;-P As I said in my answer, while historically version 7 is a curiosity, I find the System III image far much more interesting. – Rui F Ribeiro May 8 '18 at 19:38
0

In addition to the other answers, The Unix Heritage Society has downloadable and online viewable source code for a large number of old versions of Unix, and a mailing list for discussing them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.