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 Remove the Blogger Nav Bar

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 Listen Radio Online Free

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 *

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee