[root@localhost ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# 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 -sf /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
#
[root@localhost ~]# cd /etc/systemd/system
[root@localhost system]# ln -s /etc/systemd/system/default.target
0 lrwxrwxrwx. 1 root root 37 Mar 31 16:02 default.target -> /lib/systemd/system/graphical.target
[root@localhost system]#
[root@localhost system]# ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
ln: failed to create symbolic link ?.etc/systemd/system/default.target?. File exists
[root@localhost system]# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
[root@localhost system]# ls -l /lib/systemd/system/default.target
lrwxrwxrwx. 1 root root 16 Mar 31 09:45 /lib/systemd/system/default.target -> graphical.target
[root@localhost system]# ln -sf /lib/systemd/system/multi-user.target /lib/systemd/system/default.target
[root@localhost system]# reboot
本文介绍了如何在使用Systemd的系统中更改默认的目标(target),即运行级别。通过创建指向不同目标的符号链接来实现从图形界面到多用户文本界面的切换。
1883

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



