I recently wrote how to install Azure CLI 2.0 on Windows 10:
However, another option now with Windows 10 is to use the Bash Shell. Here’s the process of how to install both Bash and Azure CLI 2.0 on Windows 10
You’ll firstly need to install the Bash shell on Windows 10. To do this navigate to Settings in Windows 10. Then select For developers as shown above. Now select Developer mode.
You’ll be prompted to turn on developer mode. Select Yes to continue.
Windows will firstly search for the appropriate package
and then install it.
When complete you should receive a message, as shown above, that indicates you may need to restart your PC. You don’t have to reset just yet.
Go to Control Panel and select the option to Turn Windows features on or off. From the list that appears, locate and select Windows Subsystem for Linux (Beta) as shown above and then select OK.
Once the changes have been made you will need to reboot your PC.
Once rebooted select the Windows Start Menu and type bash. Select the bash option from the menu that appears.
Hit Y to continue.
The bash shell will be downloaded from the Windows Store as shown above.
It will then be installed.
When that is complete, you’ll need to enter a bash shell admin user name and password. This doesn’t have to be the same as you PC login but make sure you remember the details.
The bash shell installation will complete as you can see above.
If you now return to Windows Start Menu and enter bash you will see the option has changed to Bash on Ubuntu on Windows.
Next step is to ensure the Ubuntu subsystem is up to date. To do this enter the following command at the bash shell:
sudo apt-get update
Next, enter the command:
sudo apt-get upgrade
Once that is complete enter the following command:
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \ sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
sudo apt-get install apt-transport-https
sudo apt-get update && sudo apt-get install azure-cli
to actually install Azure CLI 2.0.
Now if you type:
at the command prompt you should see the Azure CLI appear as shown above.
Remember, Azure CLI is designed to be a cross platform tool. That means it works on both Windows 10 and Bash on Windows 10 as well as Mac, Linux, etc. This makes it a great way to manage Azure from any platform.