Runlevel
A runlevel indicates a mode of operation in an operating system that implements System V-style initialization. This system replaces the traditional /etc/rc and /etc/rc.local scripts used in BSD UNIX. There are seven runlevels, numbered from zero to six, and an alias runlevel named 'S'.
Table of contents |
Standard runlevels
| ID | Name | Description |
|---|---|---|
| 0 | Halt | Halts—or shuts down—the system. |
| S | Single-User Mode | Does not configure network interfaces or start daemons.[1] |
| 6 | Reboot | Reboots the system. |
[1] = Almost all systems use runlevel 1 for this purpose. This mode is intended to provide a safe environment to perform system maintenance. A single terminal was originally provided with a root login shell. The increasing trend towards physical access to the boot process has led to changes in this area.
Linux
The GNU/Linux operating system can make use of runlevels through the programs of the sysvinit project. After the Linux kernel has booted, the init program reads the /etc/inittab file to determine the behavior for each runlevel. Unless another is specified as a kernel boot parameter, the default runlevel is entered.
Typical Linux runlevels
In most Linux distributions, in addition to the standard runlevels, the following additional runlevels are defined:
| ID | Name | Description |
|---|---|---|
| 1 | Single-User Mode | Does not configure network interfaces or start daemons.[1] |
| 2 | Multi-User Mode | Does not configure network interfaces.[2] |
| 3 | Multi-User Mode with Networking | Starts the system normally.[2] |
| 5 | X Windows | Runlevel 3 + X Window System. |
[1] = The additional behavior of this runlevel varies greatly. All distributions provide at least one virtual terminal. Some distributions start a login shell as the Superuser; some require the Superuser's password to be correctly entered first; others provide a login prompt, allowing any user access.
[2] = In some cases, runlevels 2 and 3 are identical; the behavior is that of Multi-User Mode with Networking.
Slackware Linux runlevels
Slackware Linux provides simpler and somewhat different runlevels than those of other Linux distributions:
| ID | Name | Description |
|---|---|---|
| 1 | Single-User Mode | Does not configure network interfaces or start daemons, provides a login prompt. |
| 3 | Multi-User Mode | Normal operation. |
| 4 | X Windows | Runlevel 2 + X Window System |
Additionally, runlevels 2 and 5 are the same as runlevel 3.