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 How to Change Systemd Boot Target on Linux.
Fedora Linux开始使用systemd来管理系统服务。 / etc / inittab被systemd不再使用。 编辑/ etc / inittab更改系统运行级别的旧方法不再起作用。 这篇文章介绍了一种更改引导级别的“手动”方法。 对于常规方法,请检查如何在Linux上更改系统引导目标 。
systemd uses ‘targets’ instead of runlevels. By default, there are two main targets:
systemd使用“目标”而不是运行级别。 默认情况下,有两个主要目标:
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):
将运行级别更改为“多用户”(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):
将运行级别更改为“图形”(5):
# rm -f /etc/systemd/system/default.target;
ln -s /lib/systemd/system/graphical.target /etc/systemd/system/default.target
翻译自: https://www.systutorials.com/changing-systemd-runlevel-on-fedora-linux/