The single-user mode is the run level which lets us reset the root password for Linux and lets us access single-user mode.
Step 1
Reboot the OS and at the boot screen (as seen below) press the letter “e” to edit as follows.

Once you press the letter “e”, you will see the screen below.

Step 2
Scroll down the cursor to the beginning of “linux ($root)/v..)” and press ctrl+e to go to the end of the line. At the end of the line type “rd.break” and press ctrl+x to access the single-user mode.

Step 3
Then remount the /sysroot directory to “rw” and follow up the procedure as mentioned below. And finally, reboot. The next time you login, enter the new password to access root.
