Check Runlevel on UNIX Servers

There are a bunch of runlevel for UNIX or Linux which is also called init level or mode of operation. Usually there are seven init or runlevels (0 to 6). Only one runlevel can be running at a single time.

Standard Runlevel:

0 : Halt
1 : Single user mode or Maintenance mode
6 : Reboot

Linux Runlevel:

0 : Halt
1 : Single user mode or Maintenance mode
2 : Multi user mode without networking
3 : Multi user mode with networking
4 : User definable
5 : Multi user mode with GUI
6 : Reboot

Solaris Runlevel:

0 : Halt (Brings server to OBP)
S : Single user mode with root filesystem as read-only
    (Sol10: svc:/milestone/single-user)
1 : Single user mode with all filesystems mounted
2 : Multi user mode without networking (Sol10: svc:/milestone/multi-user)
3 : Multi user mode with networking (Sol10: svc:/milestone/multi-user-server)
4 : User definable
5 : Shutdown or Power-off Hardware
6 : Reboot

HP-UX Runlevel

0 : Halt (Brings server to OBP)
S : Single user mode with root filesystem as read-only
1 : Single user mode with all filesystems mounted
2 : Multi user mode with most daemons running + CDE
3 : Multi user mode with NFS and Common Desktop Environment (CDE)
4 : Multi user mode with VUE
5 : User definable
6 : User definable

AIX Runlevel

0 : Reserved
1 : Reserved
2 : Multi user mode

Now that we know the different runlevels for each flavor – here are the two ways to get the runlevel:

Checking runlevel using “who” command :

[email protected]# who -r
.       run-level 3  Feb  4 16:14     3      0  S

Checking system runlevel using “runlevel” command :

[email protected]# runlevel
N 3

Readers who found this post were searching for:

  • andy|UNIXNote


Comments