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