命令行模式和图形界面模式切换

打开文件 vim /etc/inittab

# 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 view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target

打开终端输入以下命令

[root@qdlinux src]# systemctl get-default 
graphical.target
[root@qdlinux src]# 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.
[root@qdlinux src]# systemctl get-default 
multi-user.target
[root@qdlinux src]# 

查看当前运行级别

[root@qdlinux src]# runlevel 
N 5

版权声明:本文为qdlinux原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/qdlinux/p/9442900.html