How to check run level on Linux Server?

check run level in linux server
How to check run level in server?

What is run level, how many run levels present and how to change run level?

In Linux server mainly 6 types of run level available, each and every run level having its own unique features and if you want to change a run level for your server, than kindly change the run level in /etc/inittab file but before that understand the each and every run level usage.

 0 – halt (Do NOT set initdefault to this)
 1 – Single user mode
 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
 3 – Full multiuser mode
 4 – unused
 5 – X11
6 – reboot (Do NOT set initdefault to this)

To check current run level run “who -r” on shell it will show you current run level set on your server.

root@admin [~]# who -r
run-level 3 2016-07-13 21:19 last=S

To change the run level open a file  /etc/inittab and change the value

From

id:3:initdefault:

To

id:1:initdefault:

In above example, we have changed run level from “3” to “1”,  we can also use following command to change run level

init 1

Let us know, if you have any further queries.

 

About Anant 373 Articles
Senior technical writer