Reset Root Password from GRUB (Linux)
Follow the steps below to reset the root password using the GRUB bootloader:
- Restart your machine.
- At the GRUB boot menu, select your Linux kernel entry.
- Press E to edit the boot options.
- Navigate to the end of the line that starts with
linuxorlinux16. - Add one of the following to the end of the line:
1orSorsingle. - Press Ctrl + X or F10 to boot with the edited line.
- You will now be dropped into a root shell.
- Run the following command to reset the root password:
passwd
Enter your new password when prompted, then reboot the system.