- Documentation
Elastic Compute Service
Elastic Compute Service
User Guide
Instances
Changing the hostname of an instance
Instances
Changing the hostname of an instance
Changing the hostname of an instance
The hostname is the internal computer name within the operating system of an instance. Each hostname identifies a computer. We recommend that you specify a unique hostname for each ECS instance. This topic describes how to change the hostname of an instance in the ECS console.
Precautions
- Only instances in the Running or Stopped state support hostname changes.
- Instances created using CentOS 6.9/6.10 or Ubuntu 14.04 do not support hostname changes.
Procedure
Change one instance hostname
Change multiple instance hostnames
warning
Before changing the hostname, ensure that the reset-authentication plug-in has been upgraded to the specified version. Learn more - In the left-side navigation pane, select "Instances & Images > Instances".
- In the top menu bar, select the region and project of the target instance.
- On the "Instances" page, click the "··· > Instances property > Change instance hostname" button in the "Actions" column on the right of the target instance.
- In the pop-up dialog box, enter a new hostname.
- Select the "Agree to restart Instances now" checkbox to apply the changes. You can also manually restart the instance after the operation is complete.
tip
- Selecting the "Agree to restart Instances now" check-box will interrupt your business. Proceed with caution.
- After selecting immediate restart, the Running ECS instances will restart by default, and the Stopped ECS instances will start by default.
- Click "Save" to complete the operation.
warning
- This action is supported by the orchestration service, which by default uses the CustomerRoleForOOS role to submit operations. If you have not yet created this role, refer to Orchestration permission management to enable it.
- You can also refer to Create batch instance tasks to directly modify instance attributes (including the instance name, hostname, and description) on the orchestration page.
- If the instance state is Running, changing the hostname will cause the instance to automatically restart.
- In the left-side navigation pane, select "Instances & Images > Instances".
- In the top menu bar, select the region and project where the target instance resides.
- On the Instances page, select one or more instances to modify and click the "··· > Modify instance attribute" button at the bottom of the list.
Related documents
Last updated: 2026.06.18 16:22:23