1. Press the "E" or "ESC" key on the keyboard when starting the system to enter the following interface.
2. Select the corresponding kernel, which is generally the second option. Press "E" again to display the kernel. Select the second option and press "E" again.
3. after the second step, you can edit the screen, add a space at the end of the information, directly enter the number "1" () or type "single", and press enter to go to the next step.
4. The third step appears after the operation. Do you feel like you are back to the second step? No. Press the "B" key on the keyboard to enter the boot system. Note: Here is the "B" key.
5. in the following figure, enter "#", "passwd root", reset the root password, enter the password again, and then enter the password twice, enter reboot to restart the system, and the root password is reset.
Solution to centos forgetting the root password