How to Boot CentOS in Single User Mode

Single User Mode

Single user mode, also known as maintenance mode or rescue mode, is a boot option for the CentOS operating system that allows you to boot the system with minimal services and resources. Only the most essential system processes are started, and the system runs with a single non-root user account in this mode.

This particular mode is primarily used for maintenance tasks, such as troubleshooting, repairing, or restoring the system. It can be useful in cases where the system is not booting correctly, or when you need to make changes to the system that require a lower level of access.

It is not intended for normal operation of the system, and it is recommended to boot the system in normal mode whenever possible. It is also important to be cautious when using this mode, as you have full access to the system and can make changes that could potentially cause problems if not done correctly.

How to Boot CentOS in Single User Mode

To boot CentOS in single-user mode, you will need to follow these steps:

  1. Shut down the system if it is currently running. If the system is already off, skip to the next step.
  2. Start the system and interrupt the boot process by pressing a key when prompted, such as the “ESC” key.
  3. Select the “CentOS Linux” entry from the boot menu and press “e” to edit the boot options.
  4. Use the arrow keys to navigate to the line that starts with “linux16” and add the following to the end of the line: “init=/bin/bash” (without the quotes).
  5. Press “CTRL+x” or “F10” to boot the system with the modified boot options.
  6. The system will boot to a single user mode prompt.
  7. At the prompt, enter the root password to gain access to the system.
  8. Once you are at the command prompt, you can enter commands as needed to troubleshoot or repair the system.

Please note that booting into single user mode should only be done as a last resort, and it is recommended to have a good understanding of the system before attempting to make any changes in this mode. It is also important to make sure that you have a backup of any important data before making any changes to the system.