e Learning

How To Change the Default Runlevel in CentOS 6.5

In This Tutorial We will be Learning how to change the default runlevel in Centos 6.5. And Before Make Any Changes we need to know what are the available runlevels are on CentOS 6.5.

0 – halt (Do NOT set initdefault to this)

1 – Single user mode

2 – Multiuser, without NFS (The same as 3, if you do not have networking)

3 – Full multiuser mode

4 – unused

5 – Graphical Desktop

6 – reboot (Do NOT set initdefault to this)

Like Any other Linux System CentOS 6.5 Have Seven Runlevels (0 to 6).

Configuration File is /etc/inittab. To Change the runlevel we need to edit /etc/inittab file. So open the file with a text editor. For example vim.

vim /etc/inittab

Now scroll down towards the last entry and locate the Following line.


The number after the “id:” is the id of the current default runlevel. As Per Above Example it is 5, Which means Graphical User Mode. By charging the number we can change the default runlevel.

For example If We Want Our Server to Boot on multiuser mode (which is runlevel 3) all we have to do is Change the number to 3 as below example.


Now every time you start your computer, it should boot to the Multiuser mode without Graphical Desktop.


Telinit Command

telinit command can be used to change the System Runlevel in Real Time Without restarting the computer and without changing the default.

telinit <runlevel id>

However This will not Change the Default System Runlevel.