In this post I will explain you about different RUNLEVELS in RHEL 6. All Linux services are organized by runlevels. Runlevels can be used to halt or reboot the system, some runlevels can boot Linux with or without networking services. There are six runlevels and each runlevel executes a specified set of scripts. Runlevel and description of each runlevel is given below:
Runlevel Description
- · 0 Halt
- · 1 Single-user mode, for maintenance and repairs
- · 2 Multiuser, with some networking services
- · 3 Multiuser, with networking
- · 4 Unused
- · 5 X11 console, Defaults to a GUI desktop with networking
- · 6 Reboot
All of these runlevels are defined in /etc/inittab file which is first process and which decides the default runlevel and to launch scripts for a particular runlevel. The functionality of each runlevel is given below:
- · Runlevel 0 will halt the system, never sets this runlevel your default runlevel.
- · Runlevel 1, also known as single-user mode, only one user is allowed to connect to Linux system. This runlevel is used for system maintenance, repairs, backups and restores.
- · Runlevel 2 is a multiuser with some networking. This runlevel is used for configuring the system performance.
- · Runlevel 3 is a also multiuser environment with all the networking services. This runlevel or console is used by the system administrator or other general users. This is a text based console
- · Runlevel 4 is Unused. One can edit this runlevel to make it customized to use.
- · Runlevel 5 is a X11 console. This runlevel defaults to a GUI login screen. Logins bring the user to a Graphical User Interface desktop with all networking services.
- · Runlevel 6 will reboot the system. Never set the initdefault (default runlevel) to this value. This will enter a continuous reboot cycle.
Each runlevel have some series of scripts associated with it. All scripts are collectively stored in /etc/rc.d/init.d directory and all runlevels also have their own directory which contains some start and stop scripts. The scripts associated with each runlevel can be found in /etc/rc.d directory:
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
In someone’s Linux system the default runlevel is 5, init process will in /etc/rc.d/rc5.d and run each “kill” and ”start” script. The kill script is a file or symbolic link to the file with a name that begins with “K”. Likewise, start script is a file or symbolic link to the file with a name that begins with “S”.
No comments:
Post a Comment