标签:roc 图形界面 use roo you 版本 lin /usr instead
相比7之前的版本,在centos7版本中,设置OS启动默认进入图形界面还是文本界面有了点变化
[root@rems2 ~]# systemctl get-default
graphical.target
graphical.target表示开机将默认进入图形界面
[root@rems2 ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
反向设置命令类似[systemctl set-default graphical.target]
阅读/etc/inittab,也可以发现如下内容
[root@rems2 ~]# 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 /usr/lib/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 --->告诉我们multi-user.target相当于以前的runlevel 3
# graphical.target: analogous to runlevel 5 --->告诉我们graphical.target相当于以前的runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
标签:roc 图形界面 use roo you 版本 lin /usr instead
原文地址:https://www.cnblogs.com/slqt/p/8979789.html