The 1.Linux has 7 operating levels: 0-6 corresponding profile/etc/inittab:
# Default RunLevel. The runlevels used is:
# 0-halt (do not 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 (do not set Initdefault to this)
3 and 5 are commonly used.
Often we forget the root password and need to go into single-user mode to modify the root password. So how to get into single-user mode: 1. Restart the Linux system and press ENTER (default 5 seconds) within 5 seconds. 2. Press the E key, enter start edit, then select the second line to start the item, and then press the E key. 3 Add a space after the last word of the startup item and enter single or 1 and then press ENTER. Then press B to start the system. Successfully entered single-user mode.
CentOS Rescue Mode:
When we are unable to enter the system properly, we can choose to use rescue mode to let our system run again.
First set the BIOS to the CD drive or USB stick boot, then select ' Rescue installed system '
Installation options are selected by default, and when you select Shell mode, there are three options:
Shell mode will go directly to the command line, the operation can be edited files, modify user password, etc.;
FAKD is a diagnostic mode;
Reboot will restart directly;
Select the first shell mode
Execute a command: chroot/mnt/sysimage
This article is from the "Cheng Zhen" blog, please be sure to keep this source http://chengzhen19890.blog.51cto.com/4846596/1627663
CentOS Single user and rescue mode