centos7 修改启动为命令行模式不是图像界面systemctl set-default multi-user.target
原创 justdoit 发表于:2022-05-05 12:55:27
  阅读 :110   收藏   编辑

具体相关描述在文件 vi /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
# 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
#

所以我们如果想设置启动时不开启图像,可以执行命令

# systemctl set-default multi-user.target