脚本宝典收集整理的这篇文章主要介绍了CentOS 7.1开机运行模式run level详解,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
在大多数的linux发行版本中,通常有8个 runlevel
0 Halt the system
1 Single user mode
2 Basic multi user mode
3 Multi user mode
5 Multi user mode wITh GUI
6 reboot the system
S, s Single user mode
可以在文件 /etc/inittab 中查看
[root@wode003 ~]# cat/etc/inittab
-bash: cat/etc/inittab: 没有那个文件或目录
[root@wode003 ~]# cat /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
#
// get-default
[root@wode003 ~]# systemctl get-default
graphical.target
// set-default
[root@wode003 ~]# systemctl set-default multi-user.target
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/multi-user.target' '/etc/systemd/system/default.target'
[root@wode003 ~]# systemctl get-default
multi-user.target
[root@wode003 ~]#
以上是脚本宝典为你收集整理的CentOS 7.1开机运行模式run level详解全部内容,希望文章能够帮你解决CentOS 7.1开机运行模式run level详解所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。