In most linux distributions, there are usually 8 runlevels
Runlevel System State
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
Can be viewed in the file /etc/inittab
[root@wode003 ~]# cat/etc/inittab
-bash: cat/etc/inittab: No such file or directory
[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 ~]
#The above is the detailed content of An in-depth analysis of CentOS 7.1's run levels and boot modes. For more information, please follow other related articles on the PHP Chinese website!