Linux : How to change run levels in Linux

Posted: May 26, 2012 in Linux / Redhat
Tags: , , ,


So, what are run levels? Well, they are like different modes in which you can run Linux and different run levels have different configurations. They define what services or processes must be running on the system after boot. They are different run levels in Linux but you can run only one run level at a time.

For example, you can operate in Run-level 5 which have the graphical interface or in run level 3 which will not have the graphical interface.

In Red hat Linux/Fedora, the run-levels are as shown below:

Run Levels       Details

0                      Halt

1                      Single user mode

2                      Multi-user modes without networking

3                      Multi-user mode without graphical interface

4                      unused or can be user-defined

5                      multi-user mode with Graphical interface as well as console logins

6                      Reboot

  • Changing run-levels:

Run-levels can be changed by editing the /etc/inittab file. First, make a backup of your /etc/inittab file

# cp /etc/inittab /etc/inittab.bak

So, open /etc/inittab in your vi editor or gedit editor.

            # vi /etc/inittab

Now, look for the following line :


Now, you can change the number 5 to any run-level you want. For example, if you want to change the run-level to 3 i.e. to the non-graphical interface, Then just change the change the number 5 to 3.  So, it would be like:


After making the changes, save the file and reboot. Now, your Linux OS will be running in run-level 3. You can press ALT+F2 to see the log-in prompt.

# reboot

  • Alternative Method to change run levels:

You can also change run-levels by typing “init” followed by the “run-level”. For example, if you want to change to run-level 3, in your terminal type:

            # init 3

This will reboot your machine into run-level 3.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s