systemd
still maintains the general idea of runlevels with its "Targets", but how do I change the system runlevel through systemd
?
I want to do something equivalent to the old init
-script method of:
init 3 # Multi-user
init 5 # Graphical
systemd
still maintains the general idea of runlevels with its "Targets", but how do I change the system runlevel through systemd
?
I want to do something equivalent to the old init
-script method of:
init 3 # Multi-user
init 5 # Graphical
From freedesktop.org's own systemd FAQ, to change the (running) Target (system runlevel), use systemctl isolate TARGET.target
:
systemctl isolate multi-user.target # or runlevel3.target
systemctl isolate graphical.target # or runlevel5.target
To change the default Target (default system runlevel, for the next reboot), use systemctl set-default TARGET
:
systemctl set-default multi-user.target
systemctl set-default graphical.target