How to Change Systemd Runlevel on Fedora Linux – The Manual Way
Posted on In LinuxFedora Linux starts to use systemd to manage system service. The /etc/inittab is no longer used by systemd. The old method of editing /etc/inittab to change system runlevel does not work anymore. This post introduces a “manual” way to change the boot levels. For the general method, please check https://www.systutorials.com/change-systemd-boot-target-linux/.
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 set a default target, run:
# ln -s /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
Shortcut scripts:
Change the runlevel to ‘multi-user’ (3):
# rm -f /etc/systemd/system/default.target; ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
Change the runlevel to ‘graphical’ (5):
# rm -f /etc/systemd/system/default.target; ln -s /lib/systemd/system/graphical.target /etc/systemd/system/default.target
With the latest `systemctl`, you can use `set-default` command to set the default boot mode:
# systemctl set-default graphical.target
# systemctl set-default multi-user.target