打開文件 vim /etc/inittab
linux
# 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
打開終端輸入如下命令vim
[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