azure cli
Azure CLI 2.60+Quick reference for the Azure CLI (az): authentication, subscription / resource management, VM / AKS / Storage / App Service / Key Vault, query formatting, and CI-friendly workflows — with common options and practical examples.
43 commands
Help
az --versionPrint the Azure CLI version + the Python interpreter it uses.
az --versionaz find <query>Search for `az` commands by keyword — uses a static search index shipped with the CLI.
az find 'aks'az <group> --helpShow every command under a group.
<group> --help; <group> <command> --help
az storage --helpaz <group> <command> --helpShow flags + examples for a single command.
az vm create --helpaz interactiveDrop into an interactive shell with auto-completion, syntax highlighting, and inline docs.
--style; --update; --no-param-expansion
az interactiveAuthentication
az loginLaunch a browser-based login (uses device code flow when no display is available).
--use-device-code; --tenant <tenant>; --service-principal -u <id> -p <secret> --tenant <tenant>; --federated-token <token>; --identity
az loginaz login --use-device-codeUse the device-code flow — prints a URL + code to paste in a browser on any device.
az login --use-device-code --tenant contoso.onmicrosoft.comaz login --service-principal -u <appId> -p <password> --tenant <tenant>Login as a service principal with a client secret (CI / automation).
-u <id>; -p <secret>; --tenant <tenant>; --federated-token <jwt>
az login --service-principal -u $APP_ID -p $APP_SECRET --tenant $TENANTaz logoutClear all credentials and end the current session.
--username <upn>
az logoutaz account showPrint the currently active subscription, tenant, and user.
--output table; --query
az account show --output tableaz account listList every subscription your account has access to.
--output table; --query '[].{name:name,id:id}'; --all
az account list --output tableaz account set --subscription <id>Switch the active subscription for subsequent commands.
--subscription <id>; --name <name>
az account set --subscription 'My Dev Subscription'az account clearClear all subscriptions from the local cache (forces a re-login).
az account clear && az loginOutput
az <cmd> --output <format>Choose output format: `json` (default), `table`, `tsv`, `yaml`, `yamlc`, `none`.
json; table; tsv; yaml; yamlc; none
az vm list --output tableaz <cmd> --query '<JMES>'Project the response with a JMESPath expression.
--query '[].name'; --query 'length(@)'; --query 'sort_by(@, &name)'
az vm list --query '[].{name:name,rg:resourceGroup,size:hardwareProfile.vmSize}' --output tableaz <cmd> --no-waitReturn immediately without waiting for the long-running operation to complete (poll later with `az <verb> wait`).
az vm create --no-wait --resource-group rg --name myvm --image imageResource group
az group listList every resource group in the active subscription.
--output table; --query '[].name'
az group list --output tableaz group create --name <rg> --location <loc>Create a new resource group.
--name; --location eastus; --tags env=prod
az group create --name rg-prod --location eastus --tags env=prodaz group delete --name <rg>Delete a resource group + every resource it contains (irreversible).
--name; --yes; --no-wait
az group delete --name rg-old --yes --no-waitResource
az resource listList every Azure resource under the current subscription.
--resource-group <rg>; --resource-type <type>; --name <name>; --tag env=prod
az resource list --output tableaz tagManage resource tags at scale (resource-group level).
create; update; list; delete
az tag create --resource-group rg-prod --tags env=prod owner=aliceVM
az vm listList every VM with its size + status.
--resource-group; --show-details; --query
az vm list --output tableaz vm start --name <name> --resource-group <rg>Start a VM (deallocates compute if it was previously stopped).
--no-wait
az vm start -n vm-dev -g rg-dev --no-waitaz vm stop --name <name> --resource-group <rg>Stop (deallocate) a VM to stop compute billing.
--no-wait
az vm deallocate -n vm-dev -g rg-dev --no-waitaz ssh vm --name <name> --resource-group <rg>Use the new native SSH support (Azure CLI 2.30+) to open a session without an explicit public IP.
-n; -g; --ssh-key-file <path>; --port <p>
az ssh vm --name vm-dev --resource-group rg-devAKS
az aks listList every AKS cluster.
--resource-group; --output table
az aks list --output tableaz aks get-credentials --name <name> --resource-group <rg> --overwrite-existingMerge the cluster's kubeconfig into `~/.kube/config` and switch context.
--name; --resource-group; --admin; --overwrite-existing; --file <kubeconfig>
az aks get-credentials --name my-cluster --resource-group rg-prod --overwrite-existingaz aks create --name <name> --resource-group <rg>Create an AKS cluster. Most common flags: `--node-count`, `--node-vm-size`, `--kubernetes-version`, `--generate-ssh-keys`.
--name; -g; --node-count; --node-vm-size; --kubernetes-version; --generate-ssh-keys; --service-principal; --no-ssh-key
az aks create -g rg-prod -n my-cluster --node-count 3 --generate-ssh-keysStorage
az storage account listList every storage account.
--output table; --query '[].name'
az storage account list --output tableaz storage blob upload --account-name <acc> --container-name <c> --name <blob> --file <path>Upload a file as a blob. Use `--account-key`, SAS token, or auth-mode login.
--account-name; --container-name; --name; --file <local>; --auth-mode login; --sas-token; --overwrite
az storage blob upload --account-name mysa --container-name uploads --name backup.zip --file backup.zip --auth-mode loginaz storage blob download --account-name <acc> --container-name <c> --name <blob> --file <path>Download a blob to a local path.
--account-name; --container-name; --name; --file <local>; --auth-mode login
az storage blob download --account-name mysa --container-name uploads --name backup.zip --file ./backup.zipApp Service
az webapp listList every App Service webapp.
--resource-group; --output table
az webapp list --output tableaz webapp deploy --name <name> --resource-group <rg> --src-path <local-zip>Deploy a built artifact to a webapp (zip deploy).
--src-path <zip>; --type zip; --target-path; --async
az webapp deploy -g rg-prod -n web-prod --src-path ./app.zipaz webapp log tail --name <name> --resource-group <rg>Stream container log output to the terminal.
--name; -g; --provider
az webapp log tail -n web-prod -g rg-prodKey Vault
az keyvault listList every Key Vault in the subscription.
--output table; --resource-type vault
az keyvault list --output tableaz keyvault secret set --vault-name <kv> --name <name> --value <value>Add or update a secret. Use `--file <path>` to load from a file.
--vault-name; --name; --value; --file; --encoding utf-8
az keyvault secret set --vault-name my-kv --name DB-PASSWORD --value $DB_PASSWORDaz keyvault secret show --vault-name <kv> --name <name>Read a secret's metadata + value.
az keyvault secret show --vault-name my-kv --name DB-PASSWORD --query 'value' -o tsvContainer Registry
az acr listList every Container Registry.
--resource-group; --output table
az acr list --output tableaz acr login --name <name>Login Docker to an ACR — `docker push/pulling` works directly after.
az acr login --name myregistryDiagnose
az configureManage CLI defaults (output format, default location, default group, ...).
--defaults; --list-defaults
az configure --defaults location=eastus group=rg-prodaz upgradeUpgrade the Azure CLI to the latest release (Linux only — on Windows use the installer).
az upgradeaz extension listList installed CLI extensions (az aks-preview, az spring, ...).
list; show; add; remove; update
az extension add --name aks-previewaz --debug <cmd>Print HTTP request / response debug info to stderr.
--debug; --only-show-errors
az --debug vm list 2> az.logRelated command cheatsheets
aws cli
Quick reference for the AWS Command Line Interface: configure credentials, IAM identity, EC2 / Lambda / S3 / DynamoDB / IAM, profiles, SSO, and pagination / output formatting — with common options and practical examples.
40 commands
AWS CLI v2
gcloud
Quick reference for gcloud (Google Cloud CLI), gsutil, and bq commands: authentication, project / IAM, Compute / GKE / BigQuery / Cloud Storage, config, and Cloud Build / Deploy — with common options and practical examples.
48 commands
gcloud 480+
kubectl
Quick reference for kubectl, the Kubernetes command-line client: contexts, get/describe, apply, logs/exec, rollout, scaling and debugging — with common options and practical examples.
40 commands
kubectl 1.28+
docker
Quick reference for everyday Docker CLI commands: container lifecycle, image builds, logs / exec, networking, volumes, Compose, registry and housekeeping — with common options and practical examples.
46 commands
Docker Engine 24.0+
Trademark & Use Notice
These command-line tool cheatsheets are open community references. The names, logos, and trademarks of the tools referenced here (such as Git™, Docker™, Kubernetes®, kubectl, PostgreSQL®, MySQL®, Redis™, MongoDB®, Linux™, PowerShell™, Vim™, and others) are the property of their respective owners and are used here solely for identification and reference purposes.
All content in these cheatsheets is independently authored as a simplified, self-contained reference. It is not affiliated with, endorsed by, or sourced from any official documentation. Command listings, flag descriptions, and examples are original simplifications; for authoritative information please consult the official documentation of each tool.
Command syntax and option flags may differ across tool versions. The version tags shown reflect stable releases; behavior may differ in other versions. This cheatsheet does not imply any preference or recommendation by the trademark holders.
If a trademark or copyright owner believes that any content on this site infringes their rights, please send an email to [email protected]. Upon receiving valid proof of rights, we will modify or remove the relevant content within a reasonable period.
This website assumes no legal liability for any direct or indirect losses arising from the use of information presented on these pages.
About Azure CLI
The Azure CLI (`az`) is Microsoft's official command-line tool for managing Azure resources. Released in 2014 and built on Python, `az` is cross-platform (Windows, macOS, Linux), ships as a single MSI / pkg / apt / brew install, and is now the default CLI for every Azure scenario that previously needed PowerShell `Az` modules. The current stable line is Azure CLI 2.60+ (Python 3.11+ runtime). `az` follows the verb-noun convention: `az <verb> <noun>` (e.g. `az storage blob upload`, `az aks get-credentials`, `az vm list`). Commands support JMESPath queries (`--query`), tabular / json / yaml / tsv output (`--output`), and resource-level auto-prompt for parameter completion. Authentication supports interactive `az login`, service principals, managed identities, and OIDC / federated credentials (CI without secrets). Azure CLI is MIT-licensed and never uploads source code outside of explicit API calls.
Cheatsheet version 1.0.0