CentOS 7.3 关于系统启动级别

前端之家收集整理的这篇文章主要介绍了CentOS 7.3 关于系统启动级别前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


系统版本: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

原文链接:https://www.f2er.com/centos/378483.html

猜你在找的CentOS相关文章