Azure CLI Cheat Sheet
Core Azure CLI commands for managing resource groups, VMs, storage, and subscriptions from the terminal.
2 PagesBeginnerFeb 20, 2026
Login & Subscription Context
Authenticate and set the active subscription.
bash
az login # Interactive browser loginaz account list --output table # List subscriptionsaz account set --subscription "<id>" # Set active subscriptionaz account show # Show current contextaz configure --defaults group=myRG location=eastus # Set defaults
Resource Groups
Create and manage resource groups.
bash
az group create --name myRG --location eastusaz group list --output tableaz group show --name myRGaz group delete --name myRG --yes --no-wait
Virtual Machines
Create and control VMs.
bash
az vm create --resource-group myRG --name myVM \ --image Ubuntu2204 --admin-username azureuser \ --generate-ssh-keysaz vm start --resource-group myRG --name myVMaz vm stop --resource-group myRG --name myVMaz vm deallocate --resource-group myRG --name myVMaz vm list --output tableaz vm delete --resource-group myRG --name myVM --yes
Storage & Web Apps
Common storage account and App Service commands.
bash
az storage account create --name mystorageacct \ --resource-group myRG --sku Standard_LRSaz storage container create --name mycontainer \ --account-name mystorageacctaz webapp create --resource-group myRG --plan myPlan \ --name myUniqueAppName --runtime "NODE:18-lts"az webapp deployment source config-zip \ --resource-group myRG --name myUniqueAppName --src app.zip
Output & Query Options
Formatting and filtering CLI output.
- --output table- Render results as a human-readable table
- --output json- Default machine-readable JSON output
- --query- JMESPath expression to filter/shape output, e.g. --query "[].name"
- az find- AI-assisted search for CLI command examples
- az interactive- Launches interactive shell with autocomplete
- --dry-run- Not supported natively; use 'az deployment group validate' for ARM/Bicep dry runs
Pro Tip
Use 'az configure --defaults group=<rg> location=<loc>' at the start of a session so you stop repeating --resource-group and --location on every command.
Was this cheat sheet helpful?
Explore Topics
#AzureCLI#AzureCLICheatSheet#CloudComputing#Beginner#LoginSubscriptionContext#ResourceGroups#VirtualMachines#StorageWebApps#CommandLine#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech
Professional Web Designing Services
- Responsive Websites
- E-commerce Solutions
- SEO Friendly Design
- Fast & Secure
- Support & Maintenance