One system run level
The Windows system has a safe run mode and normal operating mode, which is two different run levels, and Linux also has a system run level, and the Linux system runs at a more flexible and diversified level.
Before telling the run level, let's start with the INIT program under Linux, because the INIT program is directly associated with the system run level, and the INIT program is one of the most important programs of the Linux operating system and is a user-level process initiated by the system kernel. The init process is also the originator of all other system processes, meaning that the init process is the first process that the system runs, and its process number is always 1.
The Linux system has 7 running levels, which are specified in the/etc/inittab file, and are described below for the specific implementation of the/etc/inittab file.
Take Redhat Linux For example, the following is a piece of information from/etc/inittab.
# Default RunLevel. The runlevels used by RHS are:
# 0-halt (Don't set Initdefault to this)
# 1-single User mode
# 2-multiuser, without NFS (the same as 3, if you don't have networking)
# 3-full Multiuser mode
# 4-unused
# 5-x11
# 6-reboot (Don't set Initdefault to this)
The above information lists 7 running levels of Linux systems:
0-shutdown mode,
1-single-user mode, single user only system administrator can log in.
2-multiuser mode, but does not support file sharing, for example, does not support NFS services. This pattern is not commonly used.
3-Full multiuser mode, support for NFS services. The most commonly used user mode, default login to the system's character interface.
4-Basic User mode, you can implement some specific login requests.
5-Full multi-user mode, the default login to the X-window system, that is, login to the Linux graphical interface.
6-reboot mode, which is to perform shutdown of all running processes, and then reboot the system.
These run levels correspond to the INIT programs in Linux, such as the execution of the Init 1 system into Single-user mode, and the execution of the Init 6 system restarts.
All lines that begin with # in the Inittab file are comment lines. Comment Lines help users understand the specific meaning of each item in the Inittab file, and the values in the Inittab file are composed of the following formats:
1. Label Field
A label is a 1~4 of characters that are used to indicate the value entered. Some systems support only 2-character labels. For this reason, most people limit the number of label characters to 2. The label can be a string of any character, and the tags used in red Hat Linux are: