All Products
Search
Document Center

Elastic Compute Service:Use the multi-terminal feature

Last Updated:May 14, 2024

You can use the multi-terminal feature provided by Workbench to simultaneously connect to multiple Elastic Compute Service (ECS) instances and batch run commands. This way, you can batch manage or maintain the instances. For example, you can run O&M scripts, poll processes, update applications, and install patches. This topic describes how to use the multi-terminal feature in Workbench, including how to create terminal connection windows and how to manage terminal connection windows.

Prerequisites

Linux instances are created and are in the Running state.

Create terminal connection windows

The multi-terminal feature allows you to create multiple terminal connection windows by connecting to multiple instances and batch maintain the instances by running the same command in all of the windows concurrently. This section describes how to create multiple terminal connection windows.

  1. In the top navigation bar, choose Features > Multi-terminal.

  2. In the Multi-terminal dialog box, click Create Terminal.

  3. In the Instance Login dialog box, specify the parameters required to connect to an instance and click OK.

    Important

    You can connect to up to 16 ECS instances at the same time by using the multi-terminal feature.

  4. (Optional) You can click Create Terminal repeatedly to establish terminal connections to more instances.

  5. In the terminal connection window of an instance, enter a command and press the Enter key. Then, the command runs on all of the connected instances at the same time.

    The following figure shows the Multi-terminal page where a command is run on two instances at the same time in their terminal connection windows.多屏终端

Manage terminal connection windows

Manage terminal connection windows

This section describes how to manage the terminal connection windows of instances. You can perform various operations in terminal connection windows. For example, you can enable, disable, remove, or navigate to terminal connection windows.

  1. In the upper-right corner of the Multi-terminal page, click Manage.

    终端管理

  2. In the Multi-terminal dialog box, find the terminal connection window that you want to manage and click one of the following buttons in the Actions column:

    • Block: disables the terminal connection window. After the terminal connection window is disabled, subsequently entered commands do not take effect for the window.

      Alternatively, you can click the 禁用 icon in the upper-right corner of the terminal connection window to disable or enable the window.

    • Remove: removes the terminal connection window. After the terminal connection window of an instance is removed, the instance is disconnected.

      Alternatively, you can click the 移除 icon in the upper-right corner of the terminal connection window to remove the window and disconnect from the window.

    • Locate: navigates to the terminal connection window.

Configure the layout of the Multi-terminal page

  1. In the upper-right corner of the Multi-terminal page, click Set Window Layout.

    窗口设置

  2. You can configure the Multi-terminal page to display 1, 2, 4, 9, or 16 windows based on your business requirements.