Tool cheatsheet
Azure CLI 2 Cheatsheet
Sign in and manage resource groups, VMs, web apps, storage, Kubernetes, registries and secrets with the az command.
Sign-in and setup
- Check the CLI version — Print the Azure CLI version and installed extensions.
- Sign in — Sign in through the browser.
- Sign in without a browser — Sign in on a machine with no browser by entering a code on another device.
- Show the current subscription — Show which account and subscription commands will use.
- List subscriptions — List all subscriptions you can use, as a table.
- Switch subscription — Choose the subscription later commands run against.
- Set defaults — Set a default resource group and location so you don't repeat them.
- Search for commands — Find commands and examples by describing what you want.
Resource groups and VMs
- Create a resource group — Create a container for related resources.
- List resource groups — Show your resource groups.
- Delete a resource group — Delete a resource group and everything inside it.
- Create a Linux VM — Create a VM with SSH keys generated for you.
- List VMs and their IPs — Show VMs with their public IP addresses and power state.
- Stop and deallocate a VM — Deallocate to stop paying for compute. A plain stop keeps billing.
- Start a VM — Start a stopped or deallocated VM.
- Open a port on a VM — Allow inbound traffic to a VM's port.
Web apps, storage and databases
- Deploy a web app from a folder — Create the app service plan and web app if needed, then deploy the current folder.
- Stream web app logs — Follow the live log output of a web app.
- Set app settings — Set environment variables for a web app.
- Create a storage account — Create a general-purpose storage account.
- Upload a blob — Upload a file to a container, authenticating with your sign-in.
- List blobs — List the blobs in a container.
- List SQL servers — List Azure SQL servers in a resource group.
Containers, Kubernetes and secrets
- Sign Docker in to a registry — Authenticate Docker to Azure Container Registry.
- Build an image in the registry — Build and push an image in Azure with no local Docker needed.
- Connect kubectl to AKS — Merge the cluster's credentials into your kubeconfig.
- Scale an AKS node pool — Change the number of nodes in a cluster.
- Read a Key Vault secret — Print one secret's value.
- Store a Key Vault secret — Create or update a secret. Use a real value.
- Deploy a Bicep template — Deploy infrastructure defined in a Bicep file to a resource group.
Output and queries
- Choose the output format — Print results as a table. Other formats are json, yaml, tsv and none.
- Filter results with JMESPath — Select only the fields you need.
- Capture a value in a script — Use tsv output for a plain value without quotes.
- See the underlying requests — Print detailed logs of requests, useful for permission errors.
Related cheatsheets
- Ansible 2 cheatsheet — Run ad-hoc commands and playbooks, manage inventories, roles, collections and secrets with Ansible.
- Argo CD 3 cheatsheet — Install Argo CD, define Applications declaratively, and manage sync, diffs, history and rollbacks with the argocd CLI.
- AWS CLI 2 cheatsheet — Configure credentials and manage S3, EC2, Lambda, logs, containers and secrets with the AWS CLI v2.
- Bash and Linux 5 cheatsheet — Everyday shell and Linux commands for files, searching text, permissions, processes and servers.
- Claude API cheatsheet — Call Claude from Python, TypeScript or curl: messages, streaming, thinking, tools, structured output, caching, batches and error handling.
- Claude Code cheatsheet — Run Claude Code in the terminal: starting sessions, slash commands, permissions, CLAUDE.md, hooks, MCP servers and headless use.