RHEL/CentOS 7 systemd ‘targets’ replacement of runlevels

cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses ‘targets’ instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target

Runlevel 3 is now multi-user.target and runlevel 5 is now graphical.target.

systemctl set-default multi-user.target;
systemctl set-default graphical.target;

To switch from graphical to multi-user:
systemctl isolate multi-user.target;

To switch from multi-user to graphical:
systemctl isolate graphical.target;

Links:
https://www.centos.org/forums/viewtopic.php?t=47306
http://www.freedesktop.org/software/systemd/man/systemd.special.html
https://www.youtube.com/watch?v=jbYucYX1WwM

Leave a comment

You must be logged in to post a comment.