STARTUP AND SHUTDOWN
--------------------

To boot: type k, then unix, then login as root or guest

You shut down the system using the ancient UNIX method:

  $ su          # switch to root user
  # kill -1 1   # stop init
  # sync
  # sync
  # sync        # it's now reasonably safe to switch it off
  Ctrl-E        # stop the SIM emulator
  sim> quit     # quit the SIM emulator

Log out with: Ctrl-D.

ISSUES
------

Modern users will find V4 very hard to use! Also, this image does not 
include online manpages, read the manuals on the host machine.

USER MANAGEMENT
---------------

To add a user, first make his home directory and initial files:

  # mkdir /usr/guest

Then simply add your user to /etc/passwd with ed:

  $a    # add text after last line 
  guest::4:1::/usr/guest:
  .     # stop adding text
  1,$p  # double check everything
  w     # write (ei. save file)
  q     # quit ed

Then give his home directory the right permissisons:

  # chown guest /usr/guest

To remove a user, delet his home directory files (this is a little 
tedious with V5 rm), and then remove his entry from /etc/passwd:

  /guest/d
  w
  q

GENERAL USAGE
-------------

Superficially, V4 is similar to V5 and V6; To correct spelling mistakes,
use # to delete the previous character or @ to delete the whole line, eg.
echo hi#elol##lo, and ehho hll@echo hello, will both spell echo hello.

cd is chdir.

The early Thompson shell used prior to V7 wasn't really a programmable
shell in a modern sense. Programming usually done in PDP-11 assembly. V4
is noteworthy though for being the first UNIX system where the kernel was
written in C! It was at this point that developers started to take this
programming language seriously (there are preciously few libraries at
this point though).

V4 is also noteworthy for being the first system that included pipes in
the modern syntax. (V3 introduced pipes, but with a different syntax)
Nevertheless, you will find that many tools we take for granted today are
not present on this system, including sed, awk, tail, etc.

Some tips:

  fsck, ps: there is a check and ps command, but they don't work AFAIK.

  which:   du -a /bin /usr/bin | grep cmd
  apropos: (on host) grep -R cmd man

  printing /bin in compacted form: (pr doesn't work)
    
    echo .PP >temp
    ls /bin >>temp
    roff temp >junk
    ed junk
    g/^$/d
    1,$p
    q
    rm junk temp

  paginating through a long document:

    cat /usr/source/s1/cat.s >cat.s
    ed cat.s
    1,22p
    22,44p
    44,$p
    q
    rm cat.s

Good luck, you're gonna need it :)
