azure-cli
Manage Azure resources from the command line
TLDR
View documentation for the original command
SYNOPSIS
az [group] [command] [subcommand] [--help -h] [--verbose] [--debug] [--output -o] [--query] [options]
PARAMETERS
--debug
Increase logging verbosity to show all debug logs
--help -h
Show help for the current command
--output -o json|table|tsv|yaml
Output format (default: json)
--query "JMESPath query"
JMESPath query string to filter output
--subscription ID|name
Name or ID of Azure subscription
--verbose
Increase logging verbosity
--version
Show Azure CLI version
--only-show-errors
Only show errors, suppressing warnings
DESCRIPTION
The Azure CLI (az) is a cross-platform command-line tool developed by Microsoft for managing and deploying resources on the Azure cloud platform. It offers a unified interface to interact with over 400 Azure services, including virtual machines, storage, networking, databases, and AI/ML workloads.
Key features include support for scripting in Bash, PowerShell, or Python; JSON output for automation; JMESPath querying for data extraction; and extensibility via custom scripts or extensions. Users authenticate via az login, which opens a browser for device code flow or supports service principals and managed identities.
Installation on Linux is straightforward via package managers like apt ("snap install azure-cli --classic" or "curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash"). It's ideal for DevOps pipelines (CI/CD with Azure DevOps, GitHub Actions), infrastructure as code, and rapid prototyping. The CLI emphasizes discoverability with tab-completion, contextual help (az <group> --help), and interactive mode (az interactive).
With consistent syntax across OSes, it simplifies hybrid environments and multi-cloud strategies when paired with tools like Terraform.
CAVEATS
Requires active Azure subscription and authentication (az login). Rate limits apply to API calls. Not all Azure features are CLI-available; use portal or SDKs for gaps. Large outputs may need pagination with --top or | az rest.
INSTALLATION (DEBIAN/UBUNTU)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
or
sudo apt update && sudo apt install azure-cli
QUICK START
az login
az account show
az group list
EXTENSIONS
az extension add --name <name>
Enhances CLI with community or preview features, e.g., az extension add --name azure-devops
HISTORY
Initially released by Microsoft in March 2016 as a preview, Azure CLI 2.0 became GA in 2017, replacing the older xplat-cli. It has evolved rapidly with Azure services, reaching version 2.60+ by 2024, incorporating AI enhancements like az studio and GitHub Copilot integration.


