Contents

How to install Azure CLI

Let’s keep it easy with these one-liner’s you can use for Windows as well as Linux to install or update Azure CLI.

One-liner to install or update Azure CLI on Windows 10

1
2
# One-liner to install or update Azure CLI on Windows 10
iwr https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; start msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
/how-to-install-azure-cli/2021-08-07_111616.png
.

Following PowerShell Cmdlet aliases were used

For more details on aliases see How to get a list of PowerShell Aliases

Tip
You can verify your Azure CLI version with az --version
/how-to-install-azure-cli/2021-08-07_111617.png
.

One-liner to install or update Azure CLI on Linux

1
2
# One-liner to install or update Azure CLI on Linux
curl -L https://aka.ms/InstallAzureCli | bash
/how-to-install-azure-cli/2021-08-07_111615.png
.
Tip
The script can also be downloaded and run locally.
You may have to restart your shell in order for changes to take effect.