How to Change Systemd Runlevel on Fedora Linux – The Manual Way

Posted on In Linux

Fedora 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

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

One comment

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *