Linux Runlevel – Different runlevels on a Linux Server
Different runlevels on a Linux Server
Runlevel defines to which state the system should boot up and what all processes/services should be loaded in that state. Default runlevel of the server is set in the file /etc/inittab. While booting init process will check the runlevel in the file /etc/inittab and will start the system in that runlevel.
Init is the first processes that is started when a linux system boot up and it is having Process ID 1.
# ps aux | grep init
root 1 0.0 0.0 19232 536 ? Ss Feb03 48:14 /sbin/init
There are 7 runlevels present on a Linux server.
Runlevel 0 : Halt, this means shutdown the system. If you type “init 0” command your linux system shutdown. Do not
set this as your default runlevel.
Runlevel 1 : This the single user mode. Type “init 1” command to log into runlevel 1. This runlevel is very useful
if there are any issues on your linux server. Only root user can login to this level to repair issues
on the linux system.
Runlevel 2 : This is the multi user mode without NFS
Runlevel 3 : This is full multi user text mode. Most of the Linux Servers are in this runlevel
Runlevel 4 : This is user definable
Runlevel 5 : This is multi User mode with GUI (graphical user Interface)
Runlevel 6 : Reboot, reboot the linux system.
By default runlevel on most of the linux system will be in either runlevel 3 or runlevel 5.