Azure Tip: Running the Azure CLI using Bash on Ubuntu, in Windows 10

I recently got a question about how to use the Bash CLI instead of the Windows-based CMD experience, but remaining in Windows and not have to set up virtual machines or other computers.

The Azure team is doing an awesome job in expanding the functionality in the Azure CLI, and this goes cross-platform. It's pretty straight forward, and since I was asked I'll outline the steps here for future reference.

1. Enable the Windows Subsystem for Linux on Windows 10

The first thing we need to do on our Windows 10 box is to enable the Linux Subsystem, which is done from the Windows Fetures dialogue:

Once enabled, ensure you reboot your machine. (You know - Windows, rebooting and all that jazz...)

2. Install the Ubuntu app from the Microsoft Store

Once the feature is enabled, we'll find bash.exe on the Start Menu. Launching it will give you further instructions, saying you'll need to select a distribution to run on your subsystem:

Head on over to the Microsoft Store, search for Bash for example, and click the App called Ubuntu.

Click Get:

Et voila! It's installing:

Once it is done, you can install the Azure CLI directly into this distro. Microsoft have detailed instructions about it here.