Single user mode is the one of the Run level in Linux Operating system, Run Level means the mode of operation in Linux operating system, If the machine having problem or it doesn’t start properly that time you can use the single user mode to troubleshoot the issues.
You can have full permission to do anything on the machine and it will never ask you any password for logging in. Follow the below steps to go to single user mode. This is applicable to Linux/CentOS/RHEL.
Article will continue after the ad
Take look on the following picture you will find that grub counting the time to boot the default operating system as mentioned in /etc/grub.conf.
That time press any key to interrupt, you will see the list of kernel that is installed on the machine. In my case there are three kernels.
- Updated centos kernel with xen.
- Default installed kernel with xen.
- Default installed kernel without xen.
Select the kernel in which you want to login by using arrow keys, once selected press ‘e’ to edit the kernel parameters. Once press you will find the screen like below.
Now you go to the third line, which starts with module /vmlinuz-2.6.xx.xxx.x.xen ro root=LABEL=/ rhgb quiet. Press again “e“ to edit.
At the end of the line insert word “single”. It will look like below.
If you see full line, it looks module /vmlinuz-2.6.xx.xxx.x.xen ro root=LABEL=/ rhgb quiet single
Once done press Enter, you will get the following screen with selection of third line. Press ‘b’ to boot the kernel with edited parameter.
Once booted it will go to hash prompt i.e. root prompt without asking password. See below.