系统版本:CentOS Linux release 7.3.1611 (Core)
不再使用inittab进行设置,systemd通过使用targets的概念取代以前的启动级别
通常有两个主要target:
multi-user.target,相当于以前的level 3
graphical.target,相当于以前的level 5
查询当前默认target:systemctl get-default
设置默认target:systemctl set-default TARGET.target
例如设置默认target为multi-user.target:systemctl set-default multi-user.target
附/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