Home >Operation and Maintenance >Linux Operation and Maintenance >What to do if you forget the root password in Linux system
After restarting the system, the GRUB interface will appear. On the boot loader menu, use the up and down arrow keys to select the system for which you have forgotten the password and type "e" to enter the edit mode.
Next you can see the screen as shown below, and then you can use the up and down keys to select the latest kernel (here is the second line, kernel. ...) and continue pressing the "e" key.
Free learning video tutorial sharing: linux video tutorial
Then add "space" after rhgb quiet in the editing interface , then type "single", or directly enter the number "1" and press Enter to confirm.
After pressing Enter, press the "b" key to boot into single-user mode and change the root password here.
After restarting like this, the root password has been changed!
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of What to do if you forget the root password in Linux system. For more information, please follow other related articles on the PHP Chinese website!