Latest Blogs

Run Levels in Linux Operating System – A Complete Study

 In linux distro, there are some certain run levels exists. These run levels are managed and shifts to specific platform to do selective operations.

What are Run Levels?

Init run levels are super or admin run level in linux. It will work on different run level exists in the operating system. By calling init keyword we can easily switch to that particular run level.



Run levels are basically performing specific task in operating system. In Red Hat, there are only 7 run a level exists in the operating system.


1.      Init 0  - Shut/Halt the System

2.      Init 1 – Troubleshooting Mode

3.      Init 2 – Text login without networking capabilities

4.      Init 3- Text Interface with networking support

5.      Init 4- Unused

6.      Init 5- Graphical Mode

7.      Init 6 – Reboot or Restart the System


Where Init Run Level Configuration Exist?

These run levels are handled by OS and internally located in /etc/inittab configuration file.


Can we customize run levels?

Yes, you can customized your run level by modify the configuration file.


Why we use Run Levels?

As we know, we have seven different level are exists. Here are some explanations regarding the run levels.

Init 0: By switching init 0, it is meant for shutdown your server or system.

Init 1: It is basically used for troubleshoot the system. It is admin user login mode. You can recover any system file backup or restore your server or system.

Init 2: Text login platform without networking support. You cannot interact with networking capabilities.

Init 3: Command based platform with networking support is available in run level 3. You can perform with networking operations as well.

Init 4: It is unused and used for research and development purpose.

Init 5: The typical GUI GNOME or KDE desktop environment is initialized in run level 5.

Init 6: Reboot or restart the system by applying the run level command.  


How we can switch to run level in Linux?

Here is the example of getting the run level information in linux distro. Figure shows that which run levels are currently logged on. 

Additionally, you can simply switch to other run level by calling init 0 to 6. 

 


Final words regarding this blog, run levels are important area to understand how operating system gives and how many run levels exists. Especially in Linux, each run levels their own working and managed platform. You must aware about run level behavior so that it would be helpful to managing your server or system.

No comments