Cloud Shell supports custom settings. You can customize a command line environment. For example, you can set commands and connect Cloud Shell to your Alibaba Cloud resources. Then, you can enable the settings on a new Cloud Shell tab.
To go to the custom settings page, select Preferences from the drop-down list in the top navigation bar.
After you save the custom settings, you can select the specified item from the drop-down list in the top navigation bar. A new Cloud Shell tab appears. On this tab, a new command line environment is enabled and the custom settings are automatically implemented.
The file of the custom settings is saved in the $HOME/.cloudshell directory of the current Cloud Shell instance. You can mount the file to persistent the custom settings. Otherwise, your settings are deleted if the current instance is released.
Customize a startup command
You can customize a startup command on the custom settings page. When the configured environment is enabled, the custom command automatically runs.
Select the specified item from the drop-down list in the top navigation bar. A new Cloud Shell tab appears. On this tab, a new command line environment is enabled and the custom settings are automatically implemented.
Connect to Alibaba Cloud resources
You can configure the Alibaba Cloud resources to which the Cloud Shell instance connects. Then, select Connect to Instance from the drop-down list in the top navigation bar. When the configured environment is enabled, the Cloud Shell instance automatically connects to the specified resources.
The following table describes the supported Alibaba Cloud resources.
Resource type | Connection behavior |
Elastic Compute Service (ECS) | When the configured environment is enabled, the Cloud Shell instance automatically connects to the specified ECS instance by using SSH logon. |
Container Service (CS) | When the configured environment is enabled, the kubeconfig file is automatically configured. You can use kubectl to manage your containers. |
Cloud Shell also supports Virtual Private Cloud (VPC) resources that are not exposed to the Internet. You can access your VPC resources by establishing a secure connection in Cloud Shell. The following table describes the supported Alibaba Cloud regions.
Region | City | Region ID |
China (Hangzhou) | Hangzhou | cn-hangzhou |
China (Shanghai) | Shanghai | cn-shanghai |
China (Shenzhen) | Shenzhen | cn-shenzhen |
China (Beijing) | Beijing | cn-beijing |
When you connect to VPC resources, a primary network card is automatically created. The AliyunServiceRoleForCloudShell service-linked role is automatically created for Cloud Shell to access the VPC resources. For more information, see Service-linked roles.