• 9849-xxx-xxx
  • noreply@example.com
  • Tyagal, Patan, Lalitpur

Azure Cloud Shell

Azure Cloud Shell is a cross-platform, interactive, hosted Shell and scripting environment that Microsoft provides hosted on Ubuntu containers; you can think of this as a Shell environment as a Service.

Cloud Shell enables a browser-based CLI. The benefit of using Cloud Shell means that you do not need to download, install, or update any CLI management tools in a local Shell environment on a device or machine. Being a cross-platform management tool, all you need is a browser to run shell commands and the PowerShell Az module.

Imagine that you were to move between devices; you might not have access to the necessary CLI tools and you may not have the PowerShell modules or updates. This means that your scripts may fail to run, or your interactive commands error as they are intended for a different version than you have installed locally. However, with Cloud Shell, wherever you have access to a browser, you have access to a CLI; you will always have a consistent and up-to-date experience. You can also use Cloud Shell from the Azure mobile app so that you have a Shell environment from anywhere, at any time.

Cloud Shell provides two Shell environments so that you can choose the one that best suits your requirements, as follows:

  • Bash; with the Azure CLI installed
  • PowerShell; with the Azure PowerShell module installed

Cloud Shell can be accessed directly within the Azure portal via the code icon at the top of the portal toolbar, as shown in the following screenshot:

Figure 6.3 – Azure Cloud Shell with the PowerShell interface via the Azure portal

You can select your required Shell environment from a dropdown, depending on whether you wish to run Bash or PowerShell commands. You can drag the Cloud Shell pane up and down to resize it and have a split view, as shown in the following screenshot:

Figure 6.4 – Azure Cloud Shell with the Bash interface via the Azure portal

Cloud Shell is also available via a standalone browser-based shell, without the need to access it via the Azure portal; this standalone browser-based shell experience can be accessed from the following URL: https://shell.azure.com.

As we mentioned in the Azure CLI section of this chapter, the Azure CLI can be accessed via either the PowerShell or Bash Shell environment within Cloud Shell; this is pre-installed, unlike running it on your device, and is always available wherever you have access to a browser; this makes it portable by nature, not like an install that has been carried out on every device that you may access.

This section looked at Cloud Shell as an Azure management tool. The following section will look at Terraform on Azure.

Leave a Reply

Your email address will not be published. Required fields are marked *