When was the UNIX single-user vs multi-user modes distinction first introduced

historical-unixhistory

Practically if not actually every single UNIX-like operating system today makes the distinction between multi-user and single-user modes. Single user mode is generally intended for low-level system maintenance which cannot be performed while the system is up and running normally, even with a reduced set of services (often file system maintenance that generally needs to be done offline).

However, someone obviously had to write the first code to actually distinguish single-user mode from multi-user mode.

I suspect that multi-user mode came after single-user mode, simply because multi-user mode does more things and it makes sense to start the system initially in single-user mode and only later transition to multi-user mode (and that is how at least Linux does it; the kernel works in "single user" mode as evidenced if you pass e.g. init=/bin/bash to it, and then effectively init switches into multi-user mode), but my question is: when, and which variant/version, was the distinction between the two first made?

Best Answer

Unix was making that distinction since the very beginning, i.e. since version 1 was released in 1971.

The system was booting to multi-user mode (i.e. users connected to the available serial interfaces, tty0 to tty5 but provision was made to add four more ttys).

Unix v1 manual states for the section 4, tty page:

By appropriate console switch settings, it is possible to
cause UNIX to come up as a single—user system with I/O on
this device.

Note that with this first Unix release, spawning the login processes to each serial line was hardcoded and done by the init process itself. Selecting which mode to use was done before booting and switching to multi-user mode was done by modifying the switch settings and exiting the single user mode shell.

Later, with Unix Version 7 (1979), instead of hardware switches, the system was booting first in single user mode and when the single user shell exited, it switched to multi-user mode.

Even later, System III (1981) introduced the inittab file. With it, it was possible to better define and configure multiple run levels and select the one to use. Run level 1 was single-user and run level 2 multi-user. If the inittab file was missing, the system booted in single-user mode.

Related Question