How to change the default runlevels in CentOS 7 / Redhat 7

Share it:

In this tutorial i will show you how to change the runlevels in CentOS 7 and Redhat 7

For changing runlevels in Redhat 6 / CentOS 6 by editing /etc/inittab file, which has all the runlevels, Redhat 7 and CentOS 7 replaced the init process by systemd process hence the inittab file also changed.

It uses targets instead of runlevels

Step 1 : Determine  the current runlevel

For checking we can use the below command
systemctl get-default

Currently my system is active on the graphical mode, for this demo i am changing to multiuser (runlevel 3)


Step 2 : Check the available targets
systemctl list-units --type=target

The above command provides the list of loaded targets

Step 3 : Change the runlevel
systemctl set-default multi-user.target

Step 4 : Reboot and verify

Reboot the system and verify the runlevel
Share it:

Post A Comment: