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.