Centos 7设定默认运行级别
Centos7 中不再是使用 /etc/inittab 来配置运行级别,而是使用 systemd 来进行管理
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[root@docker ~]
# ll /lib/systemd/system/runlevel3.target
lrwxrwxrwx. 1 root root 17 Feb 23 10:08
/lib/systemd/system/runlevel3
.target -> multi-user.target
[root@docker ~]
# ll /lib/systemd/system/runlevel5.target
lrwxrwxrwx. 1 root root 16 Feb 23 10:08
/lib/systemd/system/runlevel5
.target -> graphical.target
[root@docker ~]
#
可以用来将默认(开机启动后)运行级别设定为3
[root@docker ~]
# systemctl set-default multi-user.target
Removed
symlink
/etc/systemd/system/default
.target.
Created
symlink
from
/etc/systemd/system/default
.target to
/usr/lib/systemd/system/multi-user
.target
切换运行级别3
[root@docker ~]
# systemctl get-default
multi-user.target
##runlevel 3
查看OS运行level
runlevel
Systemd介绍:http:
//www
.178linux.com
/48990
|
本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1949696