Azure CLI
Command-line tools for managing Azure resources
Quick summary
The Azure CLI (az) is a set of commands used to create, manage, and delete Azure resources. It is installed via Homebrew and provides full access to the Azure platform from the terminal.
Common tasks
Basic Usage
az loginBasic Usage
az account showBasic Usage
az account listBasic Usage
az group create --name MyGroup --location northeuropeWhat is it?
The Azure CLI (az) is a set of commands used to create, manage, and delete Azure resources. It is installed via Homebrew and provides full access to the Azure platform from the terminal.
Basic Usage
Authenticate with Azure:
$az login
View account info:
$az account show
$az account list
Create a resource group:
$az group create --name MyGroup --location northeurope
List virtual machines:
$az vm list
$az vm list --resource-group MyGroup
Create a web app:
$az webapp create --name MyApp --resource-group MyGroup --plan MyPlan
Tips
▶ Run az configure to set default values like location and resource group.
▶ Use az --help to see all top-level command groups.
▶ Use az account set --subscription "My Sub" to switch between subscriptions.