Linux virtual machine forgot root account password

1. Restart the system, press ESC to enter GRUB mode at startup, as shown in the figure: GRUB: 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.

2. Next, you can see the screen as shown in the figure below, and then you use the up and down keys to select the latest kernel (here is the second line, kernel.......), and then press "e".



3. Add "space" after rhgb quiet, then type "single", or directly enter the number "1" and press Enter to confirm.


4. After pressing Enter in step 3, enter the interface of step 2 again, press 'b' to enter

the . After startup,
use "passwd root" to change the root password. After the change, reboot (reboot).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326375060&siteId=291194637