- Documentation
Elastic Compute Service
Elastic Compute Service
Best Practices
Instance configuration
Entering Linux OS single-user mode
Instance configuration
Entering Linux OS single-user mode
Entering Linux OS single-user mode
This topic describes how to enter single-user mode on Linux instances via the system bootloader (GRUB).
Applicable scenarios
Single-user mode is a runlevel (also called a system state) of Linux systems. In this mode, the system starts only the most basic services and processes, and the operator has administrator privileges to modify all system configurations. You can use this mode to troubleshoot and maintain the system, such as diagnosing system faults, changing usernames or passwords, and managing disk partitions.
warning
Because single-user mode grants full access to the underlying system layers, operations performed in this mode may have a significant impact on the system. We recommend that you enter this mode only when necessary, and proceed with extreme caution to avoid accidental damage to system files or data.
Procedure
veLinux OS
CentOS OS
Ubuntu OS
Debian OS
OpenSUSE OS
Fedora OS
In the example provided in this section, Ubuntu 20.04 64 bit is used.
tip
In instances logged in via ECS Terminal, you can not access the system startup page directly when restarting them via command. Therefore, we do not recommend using this login method.
- On the left side of the login page, click buttons to restart the instance as instructed in the following picture.
-
- During restart, press and hold the shift key to enter the GRUB interface.
tip
On some computers, you can also press Esc to enter the GRUB interface.
-
- Use the keyboard arrow keys to navigate to "Advanced options for Ubuntu", and then press the enter key.
- Press the e key to enter the page to edit the kernel.
-
- Use the keyboard arrow keys to move the cursor to the "linux" line. After this, replace ro in this line and the content following it to the end with rw single init=/bin/bash.
-
-
- Press the F10 key or the ctrl+x key combination to enter the system single-user mode.
-
In the example provided in this section, Debian 10 64 bit is used.
tip
In instances logged in via ECS Terminal, you can not access the system startup page directly when restarting them via command. Therefore, we do not recommend using this login method.
- On the left side of the login page, click buttons to restart the instance as instructed in the following picture.
-
- After you enter the system selection page, quickly press the ↑ key to enter the page to select the kernel.
-
- After you position the cursor on the target kernel, press the e key to enter the page to edit the kernel.
- Use the keyboard arrow keys to move the cursor to the "linux" line. After this, replace ro in this line and the content following it with rw quiet init=/bin/bash.
-
- Press the F10 key or the ctrl+x key combination to start the system and enter single-user mode.
-
Last updated: 2026.06.18 17:49:51