How Do You Install the Azure CLI on a Debian/Ubuntu Linux Server?

Problem scenario
You want to use the Azure CLI on a Debian/Ubuntu Linux server.

Solution

1. Run these commands:

sudo apt-get -y update sudo apt-get install -y curl apt-transport-https lsb-release gpg curl -sL https://packages.microsoft.com/keys/microsoft.asc | \ gpg --dearmor | \ sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null AZ_REPO=$(lsb_release -cs) echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \ sudo tee /etc/apt/sources.list.d/azure-cli.list sudo apt-get -y update sudo apt-get -y install azure-cli

2. Test it with this command:
az login

(You will need to go to a web browser and enter a code.)

Leave a comment

Your email address will not be published.