在大多数的linux发行版本中,通常有8个runlevel
RunlevelSystemState
0H altthesystem
1Singleusermode
2Basicmultiusermode
3Multiusermode
5MultiusermodewithGUI
6Rebootthesystem
S,sSingleusermode
可以在文件/etc/inittab中查看
[root@wode003~]#cat/etc/inittab
-bash:cat/etc/inittab:没有那个文件或目录
[root@wode003~]#cat/etc/inittab
#inittabisnolongerusedwhenusingsystemd.
#
#ADDINGCONFIGURATIONHEREWILLHAVENOEFFECTONYOURSYSTEM.
#
#Ctrl-Alt-Deleteishandledby/usr/lib/systemd/system/ctrl- alt-del.target
#
#systemduses'targets'insteadofrunlevels.Bydefault,therearetwomaintargets:
#
#multi-user.target:analogoustorunlevel3
#graphical.target:analogoustorunlevel5
#
#Toviewcurrentdefaulttarget,run:
#systemctlget-default
#
#Tosetadefaulttarget,run:
#systemctlset-defaultTARGET.target
#
//get-default
[root@wode003~]#systemctlget-default
graphical.target
//set-default
[root@wode003~]#systemctlset-defaultmulti-user.target
rm'/etc/systemd/system/default.target'
ln-s'/usr/lib/systemd/system/multi-user.target''/etc/systemd/system/default.target'
[root@wode003~]#systemctlget-default
multi-user.target
[root@wode003~]#