# Azure Cloud Shell

Azure Cloud Shell is a Microsoft-managed terminal for running Bash or PowerShell in a browser to administer Azure resources.

Cloud service · Azure. Updated 2026-11-30. Page: https://blowstack.com/tools/cloud-services-hub/azure-cloud-shell

> Azure Cloud Shell signs you in to a hosted command-line environment with Azure CLI, Azure PowerShell, and other administration tools already installed. Use it for interactive deployments, resource inspection, and troubleshooting, with optional file persistence and a virtual network deployment option for reaching private resources.

## 7 key features of Azure Cloud Shell

1. **Hosted terminal**: Launch Cloud Shell from the Azure portal or shell.azure.com. Commands run in an Azure-hosted container, so no local command-line installation is required.
2. **Bash and PowerShell**: Choose the environment that matches your scripts. Azure CLI is available in both environments, and the PowerShell environment includes the Azure PowerShell modules.
3. **Automatic Azure authentication**: Azure CLI and Azure PowerShell use your signed-in account. Verify the active subscription before making changes, especially if you manage multiple tenants or subscriptions.
4. **Preinstalled command-line tools**: Use Git, Terraform, kubectl, and Helm without setting up a local workstation. Check tool versions before running scripts that depend on a particular release.
5. **Optional file persistence**: Start without attached storage for a disposable session, or mount an Azure Files share to retain your home directory and working files between sessions.
6. **Browser editor and file transfer**: Edit scripts and templates in the browser or transfer files through the terminal toolbar. Download any outputs you need before ending an ephemeral session.
7. **Virtual network isolation**: Deploy Cloud Shell into a supported Azure virtual network to reach private endpoints without exposing the target resources publicly. The deployment requires Azure Relay and storage reachable from the virtual network.

## Where Azure Cloud Shell is used

1. **Inventory a subscription**: Use Azure CLI or Azure PowerShell to collect resource IDs, locations, and tags, then export the results for an ownership or tagging review.
2. **Preview a Bicep deployment**: Run an Azure Resource Manager what-if operation with the intended template and parameters to review expected resource changes before deploying.
3. **Investigate a failed deployment**: Inspect deployment operations and Azure Activity Log entries to determine whether a failure came from a policy restriction, insufficient permissions, or a resource provider error.
4. **Diagnose an AKS rollout**: Use kubectl to inspect deployment status and pod events with authorized cluster access. For a private API endpoint, use a virtual network-isolated session with a route to the cluster.
5. **Administer a private Linux virtual machine**: Connect over SSH from a virtual network-isolated session using the VM's private IP address and approved credentials, without assigning a public IP to the VM.

## How Azure Cloud Shell is priced

- **No charge for shell compute**: Microsoft does not charge for the compute that hosts a Cloud Shell session. An ephemeral session does not require a backing Azure Files share.
- **Azure Files charges for persistence**: Standard Azure Files charges apply to an attached share according to its configuration and usage. Storage can continue to incur charges after a session ends.
- **Networking charges for virtual network isolation**: A virtual network deployment requires the paid Azure Relay service and can incur charges for other provisioned network resources. Each active administrator uses a Relay Hybrid Connection that closes when the session ends.

## Services Azure Cloud Shell works with

For routine Azure administration, open a standard Cloud Shell session and use your Microsoft Entra identity to call Azure Resource Manager. Tasks such as inspecting deployment operations or previewing a Bicep change generally do not require a network connection to the workloads themselves. Azure role assignments at the target scope determine which operations you can perform.

Use an ephemeral session when you only need to inspect resources or can export your results before leaving. When working files need to survive a restart, attach an Azure Files share and restrict access to its storage account. Keep team scripts in version control and save reports to an approved location if others need to review them.

For private administration, deploy Cloud Shell with virtual network isolation and use Azure Relay for the browser connection. The container needs access to its file share as well as working DNS and routes to the target endpoints. For example, diagnosing a private AKS rollout requires both network access to the Kubernetes API and authorization to read the workloads. Use Cloud Shell for interactive diagnosis and a dedicated pipeline for repeatable deployments.

- **[Microsoft Entra ID (formerly Azure AD)](https://blowstack.com/tools/cloud-services-hub/microsoft-entra-id-(formerly-azure-ad))**: Cloud Shell uses the signed-in Microsoft Entra identity to authenticate Azure CLI and Azure PowerShell. For example, an engineer with only the Reader role on a resource group can list its resources but cannot modify them.
- **[Azure Files](https://blowstack.com/tools/cloud-services-hub/azure-files)**: Cloud Shell can mount an Azure Files share and use it to persist the home directory. For example, save a deployment report under $HOME/clouddrive and reopen it from a later session.
- **[Azure Virtual Network](https://blowstack.com/tools/cloud-services-hub/azure-virtual-network)**: Virtual network isolation places the shell container in a customer-controlled virtual network, and Azure Relay connects the browser to the container. For example, an operator can connect over SSH to a VM's private IP address when routing, network security rules, and VM authentication permit it.
- **[Azure Kubernetes Service (AKS)](https://blowstack.com/tools/cloud-services-hub/azure-kubernetes-service-(aks))**: Use Azure CLI to retrieve AKS cluster credentials and kubectl to work with workloads for which you have Kubernetes permissions. For example, check rollout status and review pod events after a release. For a private cluster, the shell also needs network access to the Kubernetes API endpoint.
- **[Azure Resource Manager](https://blowstack.com/tools/cloud-services-hub/azure-resource-manager)**: Azure CLI and Azure PowerShell can submit and inspect deployments through Azure Resource Manager. For example, use az deployment group what-if with a Bicep template to preview changes to a resource group before deploying.
- **[Azure Monitor](https://blowstack.com/tools/cloud-services-hub/azure-monitor)**: Cloud Shell can query Azure Monitor Logs from the command line when the signed-in account has the required access and the workspace is reachable. For example, query a Log Analytics workspace for application errors after a deployment and compare their timestamps with the rollout.
- **[Azure CLI](https://blowstack.com/tools/cloud-services-hub/azure-cli)**: Azure Cloud Shell provides a preinstalled Azure CLI and signs it in with your Azure account when the session starts. The Try It button in Azure CLI documentation can open Cloud Shell with an example command ready to run.
- **[Azure Container Instances](https://blowstack.com/tools/cloud-services-hub/azure-container-instances)**: When Azure Cloud Shell is deployed into your virtual network, it uses Azure Container Instances to run session containers in a delegated subnet. This lets the shell reach resources that have no public endpoint.
- **[Azure DevOps](https://blowstack.com/tools/cloud-services-hub/azure-devops)**: Azure Cloud Shell provides the Azure DevOps CLI extension in its authenticated Azure CLI environment. You can use that session to list projects or manage pipelines without installing the extension locally.
- **[Azure DocumentDB](https://blowstack.com/tools/cloud-services-hub/azure-documentdb)**: Azure Cloud Shell can launch MongoDB Shell directly from an Azure DocumentDB cluster’s Quick Start page so you can query the cluster in your browser. For a public connection, the cluster’s networking settings offer a shortcut to allow Cloud Shell access through its firewall.
- **[Azure portal](https://blowstack.com/tools/cloud-services-hub/azure-portal)**: Azure Cloud Shell opens from the Azure portal toolbar as an authenticated Bash or PowerShell session. You can run a command in the terminal pane while keeping the resource you’re working on open in the portal.
- **[Azure Private Link](https://blowstack.com/tools/cloud-services-hub/azure-private-link)**: In a virtual-network deployment, Azure Cloud Shell can reach its Azure Relay namespace through a private endpoint. The endpoint serves the connection from the session container to Relay; it does not make the browser-facing Cloud Shell service itself a Private Link endpoint.
- **[Azure Relay](https://blowstack.com/tools/cloud-services-hub/azure-relay)**: Azure Cloud Shell uses an Azure Relay Hybrid Connection to link your browser to the session container when Cloud Shell runs inside your virtual network. The connection is closed when the session ends.

## Alternatives to Azure Cloud Shell in other clouds

### AWS

**[AWS CloudShell](https://blowstack.com/tools/cloud-services-hub/aws-cloudshell)**: AWS CloudShell and Azure Cloud Shell provide browser-based, pre-authenticated terminals for managing cloud resources without installing local tools. AWS includes 1 GB of persistent home storage per Region, while Azure offers disposable sessions or persistence through a billed Azure Files share.

| | Azure Cloud Shell | AWS CloudShell |
| --- | --- | --- |
| Persistent home storage | Optional, billed Azure Files share | 1 GB included per Region |
| Shell choices | Bash, PowerShell | Bash, PowerShell, Z shell |
| Linux environment | Azure Linux container | Amazon Linux 2023 |

Compared Nov 2026.

## What is Azure Cloud Shell

Open Cloud Shell from the Azure portal toolbar or go directly to shell.azure.com. Choose Bash or PowerShell to match the commands and scripts you plan to run. Both environments run in a Microsoft-managed Azure Linux container and include Azure CLI. The PowerShell environment also includes Azure PowerShell modules. Use examples written for your selected shell because Bash and PowerShell handle quoting, variables, and line continuation differently.

Cloud Shell authenticates Azure CLI and Azure PowerShell with the account you used to sign in. It does not grant additional permissions: Azure role-based access control still determines which management operations you can perform. Before running a command that changes resources, verify the tenant, subscription, and target resource group. In Azure CLI, az account show displays the current account context, and az account set changes the active subscription. Access to a resource's management settings does not necessarily grant access to its data or to a virtual machine's operating system.

Choose an ephemeral session for tasks that do not need to retain files, such as checking a deployment status. This mode does not require a storage account, and files do not survive the session. To retain scripts and configuration, attach an Azure Files share. Cloud Shell mounts the share at $HOME/clouddrive and saves the home directory as a disk image on the share. Files outside the home directory and changes to the container itself do not persist. Restrict access to the backing storage and keep shared scripts in version control rather than relying on a personal file share.

By default, the container runs on a Microsoft-managed network outside your virtual networks. It can call Azure management APIs, but it does not have a network path to endpoints that are reachable only from your private network. To manage those endpoints directly, deploy Cloud Shell with virtual network isolation in a supported region. The deployment uses Azure Relay for the browser-to-container connection and requires a storage account reachable from the virtual network. Verify private DNS resolution, routing, and target-side authorization separately before relying on the shell for incident response.

Cloud Shell is an interactive workspace, not an unattended job runner. Sessions time out after 20 minutes without interactive activity. Use it to preview an infrastructure change, investigate a failed rollout, or start a job that runs in another service. Run scheduled tasks and production deployment workflows in a pipeline or automation service so that execution does not depend on an open terminal.
