az(1)
The Azure CLI command-line interface for managing Azure cloud resources and services.
Synopsis
az [OPTIONS] COMMAND [ARGS]...Description
The Azure CLI (az) is a cross-platform command-line tool for managing Azure resources. It provides a consistent interface for provisioning, configuring, and managing cloud infrastructure on Microsoft Azure.
Commands are organized hierarchically by service (e.g., az vm, az storage, az webapp). Each command accepts options and arguments specific to its function, and most operations support output formatting in JSON, table, or TSV formats.
Common options
| Flag | What it does |
|---|---|
-h, --help | Show help message and exit |
-o, --output | Output format: json, tsv, table, or yaml (default: json) |
-q, --query | Filter output using JMESPath query syntax |
--subscription | Subscription ID or name to use for the command |
-g, --resource-group | Name of the resource group (used by many subcommands) |
--debug | Enable debug logging for troubleshooting |
--verbose | Enable verbose output |
--version | Show the Azure CLI version |
Examples
Authenticate to Azure using your browser; prompts for credentials
az loginList all virtual machines in the current subscription in table format
az vm list -o tableCreate a new Ubuntu virtual machine named 'myvm' in resource group 'mygroup'
az vm create -g mygroup -n myvm --image UbuntuLTSList all storage account names using JMESPath query, output as tab-separated values
az storage account list --query "[].name" -o tsvCreate a new resource group named 'myresourcegroup' in the East US region
az group create -n myresourcegroup -l eastusDisplay the current logged-in user's name
az account show --query user.name -o tsvCreate a new web app named 'myapp' in the specified resource group and App Service plan
az webapp create -g mygroup -p myplan -n myappDisplay the installed Azure CLI version and dependent components
az --version