In fact, it's not actually necessary to reboot in order to reach single-user
mode. The init program manages the current mode, or "runlevel", for the
system. The standard runlevels for a Linux system are labeled and defined as follows:
- 0: Halt the computer
- 1 or s: Single-user mode
- 2: Multi-user, no network
- 3: Multi-user, text console
- 4: Multi-user, graphical console
- 5: Same as 4
- 6: Reboot the computer
These runlevels vary between distributions, so be sure to consult your distro's
documentation. To change to single-user mode, use the telinit command, which
instructs init to change runlevels:
# telinit 1
You can see from the table above that you can also shutdown or reboot the
system in this manner. telinit 0 will halt the computer;
telinit 6 will reboot the computer. When you issue the
telinit command to change runlevels, a subset of the init scripts
will run to either shutdown or startup system services.