Linux has 7 levels of operation
1.init0 shut down the machine
2.init1 Single User (password missing profile modification error)
3.init2 full level of No network NFS
4.INIT3 Multi-user multi-CPU command line mode
5.INIT4 not used, reserved
6.init5 graphical interface
7.INIT6 restart
Related commands:
RunLevel viewing run Levels
[[email protected] ~]# runlevelN 3
N represents the previous run level
3 represents the current run level
Init N switch Run level
N indicates the level to toggle (both temporary switchover, restart failure)
Special Note: Cannot switch directly to single user mode can be switched before 3-5 (if the graphical system interface is already installed)
Linux everything is file (modify the configuration file for permanent effect)
Configuration file Storage Path/etc/inittab
[[email protected] ~]# vi /etc/inittab······# 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
For example, switch to the graphical interface:
[[email protected] ~]# systemctl get-default graphical.target
Then the restart takes effect
Linux entry-based system operating level 02