Wednesday, December 3, 2014

CentOS 7 run level info

Run levels in CentOS 7 are not set in /etc/inittab anymore.  Systemd uses targets instead of run levels.  You can change the default run level by using the systemctl command or making symlinks.


Check the current run level
systemctl get-default


Check available targets
systemctl list-units --type=target


Change default to run level 3
systemctl set-default multi-user.target


Change default to run level 5
systemctl set-default graphical.target


Using SymLinks

run level 3, ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

run level 5, ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

No comments:

Post a Comment