These days Linux systems comes with beautiful graphical interfaces as compared to earlier terminals that are text-mode interfaces. So, Linux system has different modes called runlevels to boot the system in either graphical mode or console mode, single user or multi-user.
Below are the various runlevels supported by Linux systems. The runlevel '0'
means halt, '1'
means single user text mode & so on..
- 0 – Halt
- 1 – Single-user text mode
- 2 – Not used (user-definable)
- 3 – Full multi-user text mode
- 4 – Not used (user-definable)
- 5 – Full multi-user graphical mode (with an X-based login screen)
- 6 – Reboot
By default the Linux system will be booted/running either in runlevel 3 or 5. If you are connected remotely and don’t know which runlevel the system is currently running, then follow below steps to find out:
How to check the current runlevel of Linux system (CentOS & Ubuntu)
To check the runlevel of your system, you can use different methods as shown below:
Method 1: Run the below command:
$sudo runlevel N 5
Method 2: Another way to check your runlevel:
$sudo who -r run-level 5 Jul 4 18:51 last=S