How to install Azure CLI on macOS
The easiest way to install the Azure CLI on macOS

The easiest way to install the Azure CLI on macOS is via the Homebrew package manager.
Install with Homebrew (Recommended)
This method is officially supported by Microsoft and simplifies updates and uninstalls.
- Prerequisites: Ensure you have Homebrew installed.
- Installation: Open your terminal and run the following command:
brew update && brew install azure-cli
Alternative Installation (MacPorts)
If you prefer MacPorts, you can install it using pip within that environment.
- Installation:
sudo port install python310
sudo port select --set python3 python310
pip install azure-cli
Verify the Installation
After installation, verify that the CLI is working by checking its version:
az version
4. Sign In to Azure
To begin managing resources, authenticate your session:
bash
az login
This will open your default browser for an interactive sign-in.
Managing the Installation
-
Update: To get the latest features and bug fixes, run:
brew update && brew upgrade azure-cliFor versions 2.11.0 and higher, you can also use
az upgrade. -
Uninstall: If you need to remove the CLI:
brew uninstall azure-cliTo remove all local configuration data, delete the hidden directory:
rm -rf ~/.azure.
Related articles
Deployment Slots no Azure
É possível publicar sem deixar fora do ar?
Vinculando Azure e Publicando seu Web Site
Veja como publicar seu site no Azure
Mauricio Junior