How to reboot CentOS in single user mode to reset root password?

If you have forgotten the root password and you need to reset it on CentOS, one can reset it by following steps:

a) At the splash screen during boot time, press any key which will take you an interactive menu.
b) Then select a Linux version you wish to boot and press “a” to append option to the line. This will bring you to a line with the boot command
c) Next at the end of that line type “single” as an option/parameter and then Press “Enter” to exit and execute the boot.

This will start the OS with single user mode which allow you to reset the root password by typing passwd and you can set new password for “root”.

One comment