GRUB is a GRand Unified Bootloader, the default bootloader in Linux. GRUB can be used to boot Linux in the single user mode. The single user mode is a restricted mode, that is used for maintenance purposes. In single user mode, the only user available is the root user, and in RHEL/CentOS, no password is asked for login.
The single user mode does not have any graphical interface or any networking services running. This article discusses how you can boot your Linux system in single user mode, using GRUB.
Step1) Restart to Grub Menu
Restart your computer and press any key when GRUB timer is running to stop the timer before timeout.
Step 2) Edit Grub Menu
Carefully read the instructions (keystrokes) provided in the lower part of the screen. It asks to press 'e' to edit the commands before booting. So, we press 'e' now to get this screen:
Step 3) Enter Run level
Here, we want to edit the kernel command. Select the second line and press 'e' again to edit this kernel command. Append the word "single" to this line, i.e. all you have to do is press space and type "single". You can also replace "single" with "1". This will also take you to single user mode or runlevel 1.
Step 4) Boot
Hit enter and press
b to boot. That is all. Just wait and you will be logged in as a root user.
In this tutorial, we learned how to boot Linux in single user mode. Hope you enjoyed reading and please leave your suggestions in the below comment section.