Method: 1. Restart the Linux system and hold down the "enter" key during startup to enter the editing interface; 2. Press the "e" key to enter the editing mode and enter "single" at the end of the second line. Then press the "enter" key; 3. Press the "b" key to boot into single-user mode; 4. Use the "passwd" command to change the password.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to solve the problem of forgetting the password in linux
The example is as follows:
Restart the linux system
Press Enter within 3 seconds, and the following interface will appear
Then enter e
and enter single at the end of the second line. There is a space. The specific method is to press the downward tip to move to the second line, press "e" to enter the editing mode
Add single at the end and press Enter
Finally Press "b" to start. After startup, you will enter single-user mode
At this time, you have entered single-user mode. You can change the root password. The command to change the password is passwd
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to solve the problem of forgetting the password in Linux. For more information, please follow other related articles on the PHP Chinese website!