Linux command
az-config 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Get all configurations
az config get
Get a specific configuration
az config get [core]
Get a specific configuration
az config get [core.no_color]
Disable color output
az config set core.no_color=true
Set default resource group
az config set defaults.group=[MyResourceGroup] defaults.location=[westus2]
Enable logging
az config set logging.enable_log_file=true
Unset a configuration
az config unset [core.no_color]
Set local configuration
az config set defaults.group=[myRG] --local
说明
az config manages Azure CLI configuration settings. It allows customizing CLI behavior including output formatting, default values, telemetry, logging, and error display. Configuration can be set globally or locally per directory. The default configuration file is stored at ~/.azure/config.
参数
- --local
- Apply configuration to local scope (working directory) instead of global.
FAQ
What is the az-config command used for?
az config manages Azure CLI configuration settings. It allows customizing CLI behavior including output formatting, default values, telemetry, logging, and error display. Configuration can be set globally or locally per directory. The default configuration file is stored at ~/.azure/config.
How do I run a basic az-config example?
Run `az config get` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --local do in az-config?
Apply configuration to local scope (working directory) instead of global.