Home >Operation and Maintenance >Linux Operation and Maintenance >What to do if you forget the root password in Linux system

What to do if you forget the root password in Linux system

王林
王林Original
2019-12-26 11:34:087912browse

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.

What to do if you forget the root password in Linux system

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

What to do if you forget the root password in Linux system

Then add "space" after rhgb quiet in the editing interface , then type "single", or directly enter the number "1" and press Enter to confirm.

What to do if you forget the root password in Linux system

After pressing Enter, press the "b" key to boot into single-user mode and change the root password here.

What to do if you forget the root password in Linux system

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn