Install azcli on Linux

0. Import gpgkey

$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  1. Create local azure-cli repository information.
# sh -c 'echo -e "[azure-cli]
name=Azure CLI
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'


2. Install with the yum install command.

$ yum install azure-cli

3. Run the login command.

$ az login

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code MYCODEHERE to authenticate.

4. Go to https://microsoft.com/devicelogin and enter the mentioned code

5. Click Next -> choose your account.