In a previous posts, we shared why Linux is the best development environment and how to create an Linux development environment on a Windows 10. With that complete, you can use your Ubuntu shell as an Azure development environment.

In this post we show you how to create a Linux Azure CLI 2.0 workstaion.

Install Azure CLI 2.0 on Ubuntu

Modify your sources list:

AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] $AZ_REPO main" | \
sudo tee /etc/apt/sources.list.d/azure-cli.list

Get the Microsoft signing key:

curl -L | sudo apt-key add -

Install the CLI:

sudo apt-get update && apt-get upgrade -y
sudo apt-get install apt-transport-https azure-cli

Log into Azure CLI

if you support US government clients as I often do you will have to change the cloud set

az cloud set --name AzureUSGovernment

from the Ubuntu command line

az login -u <username> -p <password>

A browser window shall open and ask you to authenticate to the Azure portal

once authenticated you will see a list of subscriptions you have access too

Now you can review Azure VLI commands


Where to go from here

How to install Linux Azure CLI 2.0 extensions

Categories: Article