centos 7.5关闭图形界面

1、获取默认的target
[ ~]# systemctl get-default
graphical.target

2、取消图形界面

[ ~]# 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.

3、图形界面启动
[ ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.

4、设置target 之后重启机器
reboot

相关推荐