Different Run Levels in Linux


Different Run Levels in Linux:  Unix-based operating systems are implemented with a predefined set of runlevels that presented specific mode of operation. These runlevels are numbered from 0 to 6 and were defined by the system administrator to enabling the runlevels


Where as runlevels are replaced with systemd targets in RHEL7. Systemd targets are represented by target units. Target units end with the .target file extension.
 

Also follow other topics for Comparison of the service utility with systemctl – RHEL-7 and How to Enable or Disable services on boot with chkconfig | systemctl – RHEL-6/7/8


Different Run Levels in Linux: RHEL-6


Runlevel
Mode
Action
0
Halt
Shuts down system
1
Single-User Mode
Does not configure network interfaces, start daemons, or allow non-root logins
2
Multi-User Mode
Does not configure network interfaces or start daemons.
3
Multi-User Mode with Networking
Starts the system normally.
4
Undefined
Not used/User-definable
5
X11
As runlevel 3 + display manager(X)
6
Reboot
Reboots the system
 



Default runlevel in linux (RHEL-6) are Runlevel-3 (Multi-User Mode with Networking) and Runlevel-5 (X11). All Runlevel are the script can be found in rc sub directories. At /etc/rc.d directory there will be either a set of files named rc.0, rc.1, rc.2, rc.3, rc.4, rc.5 and rc.6, or a set of directories named rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d.

Linux runlevel command as below for how to check runlevel in linux.


Runlevel command used to find current and previous runlevels.

# runlevel

N 5

Another way to find current and previous runlevels using who command with -r parameter.
# who -r
run-level 5  2019-09-12 13:48


Different Run Levels in Linux: RHEL-7


Runlevel
Target Units
Description
0
runlevel0.target, poweroff.target
Shut down and power off the system
1
runlevel1.target, rescue.target
Set up a rescue shell
2
runlevel2.target, multi-user.target
Set up a non-graphical multi-user system
3
runlevel3.target, multi-user.target
Set up a non-graphical multi-user system
4
runlevel4.target, multi-user.target
Set up a non-graphical multi-user system
5
runlevel5.target, graphical.target
Set up a graphical multi-user system
6
runlevel6.target, reboot.target
Shut down and reboot the system
 


Linux runlevel command as below how to check runlevel in linux.
 

Runlevel command used to find current and previous runlevels.

# runlevel

N 5
 

Another way to find current and previous runlevels using who command with -r parameter.

# who -r

run-level 5  2019-09-12 13:48
 


 

Comments

Popular posts from this blog

How to install glibc 2.14 on RHEL 6/ RHEL 7/ CentOS 7

Export and Import users/groups and OU in AD Server 2008 using LDIFDE command.

How to Set Up and Configure latest yum repository on CentOS