Getting Started with Azure CLI

azure cli tutorial

Getting Started with Azure CLI

The Azure CLI is a powerful tool for managing Azure resources from the command line. alt text

Installation

On Linux, you can install with:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

On macOS with Homebrew:

brew install azure-cli

Basic Commands

Login

az login

List subscriptions

az account list --output table

Set active subscription

az account set --subscription "My Subscription"

Resource Groups

Create a resource group:

az group create --name myResourceGroup --location westeurope

List all resource groups:

az group list --output table

Tips

  1. Use --output table for readable output
  2. Use --query for filtering results with JMESPath
  3. Set defaults with az configure

Happy cloud computing! ☁️