Install Azure CLI 2.0 on the Windows 10 bash on Ubuntu shell

Microsoft Azure CLI 2.0 is an excellent Azure CLI reboot based on Python which is now GA. If you want to install and run it on the bash on Ubuntu shell  provided as a developer feature with the Windows 10 Anniversary update, here’s what you need to do.

1. Install the bash on Ubuntu shell. Follow these instructions if you don’t have it. If you already have it but have installed random libraries and want to reset, you can do that by uninstalling (after saving any data) with the ‘lxrun /uninstall’ command from a command window, and then clicking on the bash on Ubuntu icon again to reinstall.

2. Get the Ubuntu subsystem up to date:

sudo apt-get update
sudo apt-get upgrade

3. Make sure you can ping your host name. The first CLI install instruction in the next step will fail if you can’t ping your hostname. To fix it I edited my /etc/hosts file and added the hostname to the localhost line: localhost PONDLIFE

I might change this later depending on what I need to do with networking and name resolution, but this works for now.

4. Follow the apt-get install instructions for a 64-bit system from the Azure CLI github install notes:

$ sudo apt-key adv --keyserver --recv-keys 417A0893
$ sudo apt-get install apt-transport-https
$ sudo apt-get update && sudo apt-get install azure-cli

Once the azure-cli package is installed you can run the ‘az’ command and see the options:


This entry was posted in Cloud, Computers and Internet, Linux, Python, Ubuntu and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s