How to setup Azure CLI for use with Bash shell in Windows

House icon

Published November 26, 2019

DevOps Consultant

Terje Sandstrøm

I've written a short guide that explains how you get the Azure CLI to show up properly with the Bash shell in Windows.

Checking if you have Azure CLI installed

You might have the Azure CLI installed even if it doesn't show up in your bash shell. Check first using either Cmd or Powershell, by running e.g.

az --version

You can run this from the bash shell, but using the full name of the cmd file:

az.cmd --version

If you have Git installed you will have bash installed as part of that. If you don't have a Linux subsystem, you can use that bash shell, but some Linux commands will not be present. For most use the Git Bash shell will be sufficient.

The following guide assumes you have this situation. If you have a Linux subsystem installed, jump further down for links to other instructions.

As usual, the full blog post can be found on my personal blog here.