Reset Lost/forgotten Root Password

Reset Root Password from GRUB (Linux)

Follow the steps below to reset the root password using the GRUB bootloader:

  1. Restart your machine.
  2. At the GRUB boot menu, select your Linux kernel entry.
  3. Press E to edit the boot options.
  4. Navigate to the end of the line that starts with linux or linux16.
  5. Add one of the following to the end of the line: 1 or S or single.
  6. Press Ctrl + X or F10 to boot with the edited line.
  7. You will now be dropped into a root shell.
  8. Run the following command to reset the root password:
passwd

Enter your new password when prompted, then reboot the system.

Was this article helpful?

mood_bad Dislike 0
mood Like 14
visibility Views: 6517

Need more information or have a question ?