Help Center/ Elastic Cloud Server/ FAQs/ OS/ How Can I Boot a Linux ECS into Debug Shell Mode?
Updated on 2025-09-30 GMT+08:00

How Can I Boot a Linux ECS into Debug Shell Mode?

Scenarios

Debug Shell is an emergency command line interface (CLI). When the Linux systemd cannot start properly or has a serious fault, you can use Debug Shell to rectify faults as user root without entering the password.

Debug Shell applies to the following scenarios:

  • Reset passwords: If you forget the password of user root, you can reset the password in Debug Shell mode.
  • Check error logs and fix configurations: If the OS is suspended after systemd starts, you can enter Debug Shell mode to check error logs and fix systemd configurations such as fstab and network configurations.

This section describes how to boot a Linux ECS into Debug Shell mode.

Procedure

  1. Remotely log in to the ECS.

    For details, see Logging In to a Linux ECS Using VNC.

  1. In the upper left corner of the login page, click Ctrl+Alt+Del to restart the ECS.

    This method does not apply to the following scenarios:

    • The ECS is experiencing lag.
    • The ECS is running EulerOS or Huawei Cloud EulerOS.
  2. Enter Debug Shell mode from kernel edit mode.
    1. After the ECS is restarted, the kernel page is displayed. Press e to enter kernel edit mode.
      Figure 1 Kernel page
    2. After entering kernel edit mode, use the arrow keys to move the cursor to the line starting with linux.
      Figure 2 Kernel editing mode
    3. Add systemd.debug-shell=1 to the end of the line starting with linux.
      Figure 3 Modifying the startup permissions
    4. Press Ctrl and X to start the system.
    1. After starting the system, click Ctrl + Alt + F9 from the Send Remote Command drop-down list in the upper left corner to enter Debug Shell mode.
      Figure 4 Entering Debug Shell mode