Unix System V-style implement conventionally 7 runlevels. This runlevel implementation varies across many Linux distribution. Usually runlevel 0, 1 and 6 are the same.
- 0 – halt
- 1 – single mode
- 6 – reboot
On Debian distributions runlevel 2-5 are dedicated to full multi-user mode with graphical managers and console login. Redhat/Fedora has two separate runlevels for each mode. To check the runlevel, you can use the runlevel command with no arguments:
$ runlevel
another way to check your runlevel is to use:
$ who -r
To see what services are starting during which runlevel you can use:
# chkconfig
The same command also allows you to turn off and on each service for any particular runlevel. For example to run apache2 on level 2 you will use command:
# chkconfig apache2 2
Tags: command, Linux, Runlevel, System