×
Community Blog Easy Command-Line Access with Cloud Shell

Easy Command-Line Access with Cloud Shell

This post shows you how you can easily manage your servers and infrastructure from a command line on Alibaba Cloud.

Creating and managing cloud servers and their associated resources on Alibaba Cloud is easy with the web-based management console. You can see all of your assets at a glance, and navigate the menus to explore the products and services available.

But sometimes, only command-line access will do. Working from a command line reduces the chance of human error when performing multiple identical tasks, and provides a useful record of actions taken. Perhaps you need to create some scripts to roll out dozens of identical servers, or gather in-depth information about your current setup for audit purposes. Maybe you want to create and schedule some automated scripts.

One way to manage your Alibaba Cloud estate via a command line is to download and install the necessary products such as Terraform, as well as the latest Alibaba Cloud CLI tools. But there's actually a much easier way. Cloud Shell gives you instant access to a logged-in Linux-based shell with all of the necessary utilities, management tools and CLI commands installed and authorized, right in your browser. Plus, it's completely free to use.

Getting Started with Cloud Shell

To try Cloud Shell, log into your Alibaba Cloud account and head to https://www.alibabacloud.com/products/cloud-shell , then click the Use Now button. After a few seconds the shell will launch. Typing "help" will get you started in exploring the features that are available. Your most-used command will probably be "aliyun". Type "aliyun help" to see the full list of commands available here. For example, typing "aliyun ecs DescribeDisks" will show you information about any cloud disks associated with your account. Typing "aliyun ecs help" will show you the other ECS-related options available at the aliyun prompt for managing Elastic Compute Service servers.

Cloud Shell logs out automatically after 30 minutes of inactivity. To close it manually, type "exit" or simply close the browser window. The Cloud Shell VM is released 15 minutes after you log out. If you restart the Cloud Shell within 15 minutes you will log back on to the original VM instance, otherwise you'll get a new one.

A Cloud Shell VM includes 10GB of free temporary storage, which is deleted when the VM is released. When you start Cloud Shell you'll be offered the opportunity to create some chargeable NAS storage. Alternatively, just mount any existing cloud drive that you've already created.

The cloud shell virtual machine is preinstalled with terraform and the Alibaba Cloud CLI. It also supports system tools such as ssh for connecting to servers, vim for editing text files and scripts, and jq for analyzing the JSON output that many of the aliyun CLI commands return.

To try Cloud Shell for yourself, or to read more about it, just log into your Alibaba Cloud account and go to https://www.alibabacloud.com/products/cloud-shell

0 0 0
Share on

Alibaba Clouder

2,599 posts | 764 followers

You may also like

Comments