Install Azure CLI in Linux

In this article, we will learn how to install Azure CLI in different distributions of Linux.

When you are working with Linux, sometimes it is difficult to install the desired application using your favorite commands like apt-get, yum or apk. If your favorite commands does not works, your need to find the download, un-tar commands or update your application repositories.

The quickest way to installing Azure CLI in your Linux machine is to run a Docker container from the Microsoft account in the Docker Hub. Assuming that you have Docker daemon installed in your machine.
Run the run command from any one of your Linux distributions CentOS / Ubuntu / Debian / Alpine, with the -it flags attaches you to an interactive tty in the azulre-cli container.

# docker run -it microsoft/azure-cli

This command will enable Azure CLI in your system.

Check the Azure CLI version

Now you are ready to check your Azure CLI version.

#azure -v

Leave a Comment