Linux has 7 RunLevel, specific to 0-6 levels
0: Indicates shutdown.
1: Single User (no authentication required, can change root password, if grub is not set password)
2, 3, 4: Indicates multi-user mode. The normal boot system, without the installation of a graphical interface, entered the 3 level.
5: Representation of the image interface
6: Restart
Ls-l/usr/lib/systemd/system/runlevel*target #可查看具体7个级别的解释.
When you do not know the root and grub password, change the root password as follows:
1. Turn off the machine first: Init 0
2. Click on the virtual machine power supply, boot, enter the BIOS. The purpose is to load the optical drive when booting.
3. After entering the BIOS, change the CD-ROM to the first boot entry. After F10, error and launch.
4. You will then re-enter the CD-ROM boot screen and select the third one. Enter.
5. After entering, select the second item. Enter. then enter.
6. Return to the following screen after waiting for a short time. Select 1
1. Go on
2. Read-Only Mount
3. Skip the shell.
4. Restart
7. Click Enter
8. Enter chroot/mnt/sysimage into the original system.
9.PASSWD Root setting password
10. Reboot into BIOS, change boot to original, OK, start again.
Note: If you modify the wrong configuration file, causing the system to go, you can use this method to recover.
Linux-Rescue Mode