1. run level in Linux)
The level ranges from 1 to 6. Different levels have different functions. See:
# The default running level. RHS uses the following levels:
#0-stop (do not set initdefault to 0)
#1-single-user mode
#2-multiple users, but no NFS
#3-full multi-user mode
#4-useless
#5-X11
#6-Restart (do not set initdefault to 6)
Detailed explanation of each running level:
0 indicates that the machine is shut down.
1 is the single-user mode, just like the security mode in Win9x.
2: multi-user mode, but not supported by NFS.
3 is a complete multi-user mode, which is a standard operation level.
4. Generally, you can use it to do things in some special cases. For example, you can switch to this mode to make some settings when the battery of your laptop is exhausted.
5 is the X11, And it enters the Xwindow system.
6. Restart the init 6 server.
Ii. Related Files in Linux
These levels are specified in the/etc/inittab file. This file is the main file found by the init program. The first service to run is the files stored in the/etc/rc. d directory.
Different runtime levels are defined as follows: (refer to/etc/inittab in Red Hat Linux)
Different running levels have different functions and should be set according to different situations.
For example, if the root password is lost, you can set the machine startup status to a single user. Enter:
Init =/bin/sh rw (or linux 1; linux single)
This allows the machine to enter runtime Level 1 and mount the root file system to read/write. It will skip all system authentication and allow you to change the root password using the passwd program, and then start to a new running level.