Booting CentOS 7 in single user mode is total different than of CentOS 6 as it uses a different version of Grub. We will go step by step to boot into single user mode in CentOS 7.
- First, boot the screen and press an arrow key while the timer comes on this screen to stop the timer
- Press ‘e’ on the selected default CentOS version. That will take you to the following screen
- These are grub commands that the bootloader is using to boot you to the system. Arrow down in this window to the line, that starts with linux16. Now take the right arrow on the keyboard to take your cursor to the word that says ‘ro’ as shown in the image
- Now replace ro with rw init=/sysroot/bin/sh as shown below
- Now press Ctrl + x to start Single User Mode
You should be done now, you are on the single user mode console. If you would like to use the main system, you may chroot as the following:
Now, if you are trying to reset the root password, after booting into the single user mode, you may follow the following to reset the root password: