az-version
Display Azure CLI version information
TLDR
Show the current version of Azure CLI modules and extensions in JSON format
Show the current version of Azure CLI modules and extensions in a given format
SYNOPSIS
az version [global_options]
az --version [global_options]
PARAMETERS
--debug
Increase logging verbosity to show all debug logs.
--help -h
Show help message for the command or subcommand.
--only-show-errors
Only show errors, suppressing warnings.
--output -o {json,jsonc,table,tsv,yaml,yamlc,none}
Output format. Default is json for az version.
--query
JMESPath query string to filter or transform the output.
--verbose
Increase logging verbosity. Use --debug for full debug logs.
DESCRIPTION
The az-version command, though not a standalone executable in typical Linux distributions, refers to the common practice of obtaining version information for the Azure Command-Line Interface (Azure CLI). This functionality is primarily provided by the az command itself, specifically through the az version subcommand or by passing the --version global argument to az. It displays a comprehensive summary including the Azure CLI version, versions of installed core modules, extensions, the Python runtime used, and the operating system information. This command is crucial for troubleshooting, verifying environment setup, and ensuring compatibility with Azure services. It helps users quickly identify their CLI environment when reporting issues or checking for updates.
While az-version might be an alias or a misnomer, the underlying command az version is a fundamental utility for anyone working with Azure services via the command line.
CAVEATS
This analysis assumes az-version refers to the functionality of retrieving Azure CLI version information, commonly done via az version or az --version, as az-version is not a standard standalone executable. The command requires the Azure CLI to be installed on the system. The output structure can vary slightly between different Azure CLI versions and installed components. Some component versions might appear as 'unknown' if they are not detected or are not relevant to the current installation.
TYPICAL OUTPUT
The output of az version is usually a JSON object (by default), providing structured information. It typically includes the azure-cli version, versions of core modules (e.g., azure-cli-core), installed extensions, the Python version, and basic OS details (name, version). This detailed breakdown is invaluable for diagnosing issues related to specific CLI components or environmental factors.
TROUBLESHOOTING AID
The az version command is frequently requested by Microsoft support or community forums when users encounter issues. Providing its output helps in quickly understanding the user's CLI setup, identifying potential version mismatches, or outdated components that might be causing problems.
HISTORY
The Azure CLI has evolved significantly since its inception. Initially, the cross-platform CLI (Xplat CLI) was based on Node.js and offered basic Azure management capabilities. With the advent of Azure Resource Manager, a new, Python-based Azure CLI 2.0 (now simply Azure CLI) was developed, offering richer functionality and a more consistent experience. The version command (and --version global option) has been a core part of the Azure CLI's utility, enabling users to easily check their environment. Its importance grew with the increasing complexity of Azure services and the need for clear environment information for support and debugging.