How to check current runlevel of a Linux Server
How to Find the current runlevel of a Linux Server? – Linux Commands to check current runlevel of Linux System
Runlevel 0 – Halt
Runlevel 1 – Single User Mode
Runlevel 2 – Multi User Mode but no NFS
Runlevel 3 – Multi User Mode with Networking
Runlevel 4 – Not Used
Runlevel 5 – Multi User Mode + GUI
Runlevel 6 – reboot
Do the below steps to find the current runlevel of a Linux System/Server.
Log into your Linux Server via SSH as ‘root’ to check the current state of your Linux Server. You can use software like ‘putty’ to login to your Linux Server.
Type the command “runlevel” to check the current runlevel of a Linux Server
Command : runlevel
Example is Given below :
N 3
N 3 = Server is in runlevel 3
N 5 = Server is in runlevel 5
Step 2 :
Alternate way to check the Runlevel of a Linux PC/Server
Command : who -r
You can use the command “who -r” to check the current level of your linux system
run-level 3 2015-12-03 06:45
The above server is in Runlevel 3
Step 3 :
You can check the runlevel of your Linux Server by checking the inittab file
File Name : /etc/inittab
Command : grep -i initdefault /etc/inittab
Type the above command on your Linux System/Server
id:3:initdefault:
id:3:initdefault = Means the server is in runlevel 3
id:5:initdefault = Means the server is in runlevel 5