Install the Azure CLI from Microsoft's official download link, the GitHub releases page, or a supported package manager like winget or Homebrew. On Windows you get an MSI or ZIP; macOS and Linux use pkg, tar.gz, or native repos. Match the package to your CPU architecture (x64 vs ARM64) and confirm with az version.
Official Sources and System Requirements
| Scenario or Platform | Recommended Route | Key Requirement |
|---|---|---|
| Windows 11 / 10 (most users) | winget install --exact --id Microsoft.AzureCLI or MSI installer |
64-bit Windows; admin approval for MSI |
| Windows, scripted or version-pinned | ZIP package or specific-version URL | Extract and run az from the extracted folder |
| macOS (Intel or Apple silicon) | Homebrew brew install azure-cli or pkg installer |
Correct x86_64 vs arm64 build |
| Ubuntu / Debian, RHEL / Fedora | apt or dnf with Microsoft's package repo |
Repo added before install |
| Linux without package manager | tar.gz archive (e.g., azure-cli-2.94.0-linux-x86_64.tar.gz) |
Extract, run ./az, optionally symlink |
| Air-gapped or offline machine | Transfer the ZIP/tar.gz from a connected machine |
Carry the matching architecture build |
| No local install wanted | Azure Cloud Shell or Docker container | Browser sign-in or Docker host |
The current Windows install documentation lives on the Azure CLI Windows install page. For pip-installed setups, the --exact option ensures you get the official package rather than a similarly named third-party one. Every release publishes SHA256 hashes you can verify before running the installer.
Step-by-Step Azure CLI Installation
-
Confirm your OS and architecture first. On Windows, open Settings > System > About and read System type (
64-bit operating system, x64-based processorvsARM64-based processor). On macOS, rununame -min Terminal. On Linux, rununame -m. Pick the matching package; a wrong-architecture build fails at launch, not at download. -
Install on Windows with
winget(preferred). Open PowerShell and run:
winget install --exact --id Microsoft.AzureCLI
Accept the UAC prompt. If winget reports no matching package, the App Installer is outdated—update it from the Microsoft Store, or fall back to the MSI from the official page. To pin a version, add --version 2.94.0.
-
Install on Windows with the MSI. Download the latest MSI, run it, and select Yes when Windows asks whether the installer can make changes. You cannot choose an install location: 64-bit lands in
C:\Program Files\Microsoft SDKs\Azure\CLI2and 32-bit inC:\Program Files (x86)\Microsoft SDKs\Azure\CLI2. Close and reopen your terminal afterward soPATHrefreshes. -
Install on macOS. With Homebrew, run
brew install azure-cli(orbrew update && brew upgrade azure-clito update). Otherwise download thepkgfor your chip (macos-arm64for Apple silicon,macos-x86_64for Intel) and run it through System Settings > Privacy & Security if Gatekeeper blocks the first launch. -
Install on Linux. For Ubuntu/Debian, add Microsoft's repo, then
sudo apt install azure-cli. For manual installs, extract thetar.gzand runazdirectly from the folder—no system-wide footprint needed. -
Verify the install. Run:
az version
You should see JSON with azure-cli, azure-cli-core, and extension versions plus the Python version. If the command isn't recognized, the install folder isn't on PATH—fix that before troubleshooting anything else.
- Sign in and confirm. Run
az login, complete the browser or device-code flow, thenaz account showto confirm the active subscription. If you belong to multiple tenants,az account set --subscription "<name-or-id>"switches cleanly.
Verifying Downloads and Spotting Fake Installers
Only pull the CLI from the official Microsoft install page or the Azure CLI GitHub releases page. The releases page lists SHA256 hashes per artifact (for example, azure-cli-2.94.0-linux-x86_64.tar.gz). Compare locally:
sha256sum azure-cli-2.94.0-linux-x86_64.tar.gz
On macOS or Windows, use shasum -a 256 or Get-FileHash. If the hash doesn't match the release note, delete the file and re-download—do not run it. Avoid search ads and third-party "Azure CLI download" sites; legitimate packages never ask for a paid license or bundle unrelated toolbars.
Troubleshooting Installation Failures
az not recognized after install. The install path isn't on PATH. On Windows, reopen the terminal; if it still fails, add C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin to Environment Variables > Path. On macOS or Linux, confirm with which az and check your shell profile.
Installer blocked or unsigned-package warning. A corporate policy or SmartScreen is the usual cause. On a work device, stop and confirm with IT—bypassing policy on managed hardware can trigger a lockout. On personal machines, verify the file's hash first, then allow it via Properties > Unblock or Windows Security > App & browser control.
ARM64 vs x64 mismatch. On Windows on ARM, run the ARM64 MSI; the x64 build may install but run under emulation with slower az startup. On Apple silicon, azure-cli from Homebrew installs the native arm64 build automatically—don't mix with a manual x86_64 pkg.
Version pinning needed for scripts. Use winget install --exact --id Microsoft.AzureCLI --version <version> or download the versioned asset from GitHub releases. After pinning, freeze your CI images so updates don't drift your automation.
Offline install on an air-gapped machine. Download the ZIP or tar.gz on a connected machine, transfer it, extract, and run az from the extracted folder. The CLI is self-contained; no separate Python install is required. For an MSI-based offline flow, keep the full installer package rather than relying on the web bootstrapper.
Extension or profile conflicts. If az fails at launch after an upgrade, remove user extensions with az extension remove --name <name> and retry, or run az upgrade to refresh the core. Corrupt config sits in ~/.azure on Linux/macOS or %USERPROFILE%\.azure on Windows—back it up before clearing.
Updating the CLI and Cross-Platform Notes
On Windows, az upgrade updates the CLI and extensions in one step; winget upgrade --id Microsoft.AzureCLI also works. On macOS, brew upgrade azure-cli. On Linux with the repo configured, sudo apt update && sudo apt upgrade azure-cli. Cloud Shell and the Docker image always ship the current build, so no manual update is needed there.
Frequently Asked Questions
Does the Azure CLI require Python to be pre-installed?
No. The MSI, ZIP, pkg, and tar.gz packages are self-contained and ship their own runtime. Only the pip install route needs a compatible Python environment.
Can I install the Azure CLI without administrator rights?
Yes—use the ZIP (Windows) or the tar.gz (macOS/Linux), extract it to a user-writable folder, and run az from there. You'll manage the PATH entry yourself, which keeps the install fully per-user.
What's the difference between the MSI and the ZIP on Windows?
The MSI is the standard, system-wide install that wires up PATH for PowerShell and cmd.exe. The ZIP is portable: no installer, no registry changes, ideal for locked-down machines or version pinning.
How do I know which version I have?
Run az version. It prints the CLI version, core version, and extension versions in JSON so you can confirm the exact build before filing a support report.