top of page
Writer's pictureBrett Borschel

Install Azure CLI with Yum

Updated: Sep 21, 2020

This is life-changing...

Install Azure CLI with Yum

I have a Linux server that I use for almost all my day to day job duties and wanted to be able to run scripts straight from my CLI into my companies Azure subscriptions.


Install Azure CLI on CentOS, RHEL, or Fedora


1. Import the Microsoft repository key.


sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

2. Create local azure-cli repository information.


sudo 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'


3. Install with the yum install command.

sudo yum install azure-cli

4. Run the login command.

az login

5. If the CLI can open your default browser, it will do so and load an Azure sign-in page. Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal. Sign in with your account credentials in the browser.


-Brett


Reference:




9,827 views0 comments

Comments


Post: Blog2_Post
bottom of page