Ready to Start Your Career?

What are Linux Runlevels?

Sean Mancini's profile image

By: Sean Mancini

July 24, 2018

Linux and Unix utilize runlevels to enable certain functionalities from single user mode to GUI mode.These runlevels cater to different needs for system administrators and for troubleshooting.You can set a default runlevel to, say, boot the CLI instead of the GUI. On servers, you generally would use Runlevel 3, which is the multi-user mode that only gives you access to the GUI. But if you want to use the GUI, then you can raise your runlevel to Runlevel 5, which will enable the full GUI.The following is a chart of runlevels that apply to Linux and Unix:
0Halt the system.
1Single-user mode (for special administration).
2Local Multi-user with Networking but without network service (like NFS)
3Full Multi-user with Networking
4Not Used
5Full Multi-user with Networking and X Windows (GUI)


In systemd, the runlevels are slightly different. Runlevels are targets, and in order to enable a target, you will use the systemctl command to enable the target.


  • Runlevel 0 is matched by (and is a symbolic link to
  • Runlevel 1 is matched by (and is a symbolic link to
  • Runlevel 3 is emulated by (and is a symbolic link to
  • Runlevel 5 is emulated by (and is a symbolic link to
  • Runlevel 6 is emulated by (and is a symbolic link to
  • Emergency is matched by
     Checking the current default runlevel in systemd
  • systemctl get-default
As you can see from the above chart, you can issue a run-level, i.e., 0, which would halt, or shutdown the system. This is obviously the lowest level to which the system can go. Then the higher the runlevel, the more the functionality.You can see why you would use Runlevel 3 for a server environment: The base install of Ubuntu server without a GUI installed, such as GNOME or KDE, would go to a max runlevel of 3.You can change the default runlevel of your system and you can change the following file:/etc/init/rc-sysinit.conf - Ubuntu (Non Systemd)/etc/inittab - Redhat/Centossudo systemctl enable - SystemD You would definitely NOT want to change your default runlevel to 0 or 6. That would be bad and result in a system that either shuts down right away or reboots right away, which is not very useful.You can also add scripts that run at certain runlevels. If you go to /etc/rc.d/, you will see folders, such as init.d/ rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/. You can add scripts to these folders, and the scripts will be called when that runlevel is initiated.You can also change runlevels by running a command in the terminal runlevel 1,2,3 etc .


I hope this helps you understand runlevels. If you have any questions, please let me know!Check out my Youtube video with a demo of this in action!For this and other topics, visit my blog at or email me.  
Schedule Demo