Install the Azure CLI
The Azure Command-Line Interface (CLI) is a powerful tool for managing Azure resources from your command line. Follow these instructions to install the Azure CLI on your operating system.
Prerequisites
Before you begin, ensure you have the following:
- An Azure account. If you don't have one, you can sign up for a free account.
- A compatible operating system (see below for supported OS).
- Administrator privileges on your machine for installation.
Installation Options
Verify Installation
Once installed, open a new terminal or command prompt window and run the following command to check the installed version:
az --version
You should see output similar to this:
Azure CLI 2.45.0
Core
Extensions:
account 2.2.16
role 2.3.14
Python location '/usr/local/bin/python3'
Extensions directory '/Users/youruser/.azure/cliextensions'
Note: If you installed using a script or package manager, you might need to restart your terminal or log out and back in for the changes to take effect.
Tip: To keep your Azure CLI up-to-date, use the update commands specific to your installation method (e.g., az upgrade for some installations, or your system's package manager). You can also check for updates using az --version and comparing it with the latest release on GitHub.