← 返回命令列表

Linux command

az 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Login

az login

List

az group list

Create

az group create --name [MyResourceGroup] --location [eastus]

List

az vm list

Get

az account show

Example

az account set --subscription [subscription-id]

说明

az is the unified command-line interface for Microsoft Azure. It provides access to Azure services including virtual machines, storage, databases, Kubernetes, and hundreds of other cloud resources through a consistent cross-platform interface. The CLI enables automation, scripting, and management of Azure resources without using the web portal.

参数

--output, -o _format_
Output format (json, jsonc, table, tsv, yaml, none)
--query
JMESPath query to filter output
--subscription _id_
Subscription name or ID
--resource-group, -g _name_
Resource group name
--location, -l _region_
Azure region
--verbose
Increase logging verbosity
--debug
Enable debug logging
--only-show-errors
Only show errors

FAQ

What is the az command used for?

az is the unified command-line interface for Microsoft Azure. It provides access to Azure services including virtual machines, storage, databases, Kubernetes, and hundreds of other cloud resources through a consistent cross-platform interface. The CLI enables automation, scripting, and management of Azure resources without using the web portal.

How do I run a basic az example?

Run `az login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --output, -o _format_ do in az?

Output format (json, jsonc, table, tsv, yaml, none)