How to Switching or Changing Between Different Runlevels on Linux

linuxThe runlevel is a software configuration of the system which allows only a selected group of processes to exist. Usually runlevel 0, 1 and 6 are the same and reserved for the following purposes :

0 – halt
1 – single mode
6 – reboot

Meanwhile runlevel 2,3,4 and 5 used for the following :

2 – Multi-User Mode
3 – Multi-User Mode with Networking
4 – Not used/User-definable
5 – Start the system normally with appropriate display manager. ( with GUI )

How to Check and Display Runlevel on Unix or Linux System

In this post, i will show two method to switching or changing between different runlevels on linux. The steps has been tested on CentOS 6.2.

READ  How to Upload and Install a Blogger Template

Method 1. Changing run level temporarily without reboot :

In order to change the run level immediately without reboot, you can use init command. Assumed that you are currently in the default run level 3 and want to switch to run level 1 which is will enter single user mode, execute “init 1” :

[root@centos62 ~]# init 1

To shutdown the system, execute “init 0” :

[root@centos62 ~]# init 0

To reboots the system, execute “init 6” :

[root@centos62 ~]# init 6

Please note that above command is not permanent and the system will return to default run level after reboot.

READ  How to Install vim-nox on Ubuntu 11.10

Method 2. Changing the run level permanently :

[root@centos62 ~]# vi /etc/inittab

Let assumed the default run level is 3.


Change the initdefault to 5 as below :


Leave a Reply

Your email address will not be published. Required fields are marked *