标签:style let targe set 系统 cal color 注释 文件
今天装了一台centos7,像往常一样通过/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
开始有点懵,然后仔细一看这些注释行的意思,瞬间明白了,这个配置文件告诉我们,以前的inittab不再使用,现在使用target控制启动级别,使用方法是:
systemctl get-default #查看默认启动级别
systemctl set-default multi-user.target #设置启动级别为多用户命令行
systemctl set-default graphical.target #设置启动级别为图形界面
顺便介绍下启动级别:
标签:style let targe set 系统 cal color 注释 文件
原文地址:https://www.cnblogs.com/wangzengyi/p/12434572.html