How do I change the default runlevel?
systemd uses symlinks to point to the default runlevel. You have to delete the existing symlink first before creating a new one
rm /etc/systemd/system/default.target
Switch to runlevel 3 by default
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
Switch to runlevel 5 by default
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
systemd does not use /etc/inittab file.
How do I know the current run level?
runlevel command still works with systemd. You can continue using that however runlevels is a legacy concept in systemd and is emulated via 'targets' and multiple targets can be active at the same time. So the equivalent in systemd terms is
systemctl list-units --type=target
本文介绍如何在使用Systemd的系统中更改默认运行级别。包括删除现有符号链接并创建指向multi-user.target或graphical.target的新符号链接以分别设置运行级别3或5。Systemd不使用传统的/etc/inittab文件,而是通过目标(target)来模拟运行级别的概念。
4541

被折叠的 条评论
为什么被折叠?



