美文网首页
CentOS 7 切换启动模式

CentOS 7 切换启动模式

作者: zivszheng | 来源:发表于2018-07-06 13:17 被阅读0次

CentOS 7 切换启动模式

命令 vim /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

从上面可知 centos 仍然只有两种启动模式

multi-user.target: analogous to runlevel 3  #命令行模式
graphical.target: analogous to runlevel 5   #图形模式

通过 systemctl get-default 命令获取当前模式

[root@MiWiFi-R1CM-srv xinetd.d]# systemctl get-default
graphical.target

通过 systemctl set-default multi-user.target 命令,修改启动模式

[root@MiWiFi-R1CM-srv xinetd.d]# systemctl get-default
multi-user.target

reboot 检验下设置效果

相关文章

网友评论

      本文标题:CentOS 7 切换启动模式

      本文链接:https://www.haomeiwen.com/subject/qywvuftx.html