Quickstart for Azure Cloud Shell
This document details how to use Bash and PowerShell in Azure Cloud Shell from the Azure portal.
Start Cloud Shell
Launch Cloud Shell from the top navigation of the Azure portal.
The first time you start Cloud Shell you're prompted to create an Azure Storage account for the Azure file share.
Select the Subscription used to create the storage account and file share.
Select Create storage.
Select your shell environment
Cloud Shell allows you to select either Bash or PowerShell for your command-line experience.
Registering your subscription with Azure Cloud Shell
Azure Cloud Shell needs access to manage resources. Access is provided through namespaces that must be registered to your subscription. Use the following commands to register the Microsoft.CloudShell namespace in your subscription:
az account set --subscription <Subscription Name or Id>
az provider register --namespace Microsoft.CloudShell
Note
You only need to register the namespace once per subscription.
Set your subscription
- List subscriptions you have access to.
az account list
- Set your preferred subscription:
az account set --subscription 'my-subscription-name'
Tip
Your subscription is remembered for future sessions using /home/<user>/.azure/azureProfile.json
.
Get a list of Azure commands
Run the following command to see a list of all Azure CLI commands.
az
Run the following command to get a list of Azure CLI commands that apply to WebApps:
az webapp --help
Next steps
Feedback
Submit and view feedback for