How-To: Install Azure CLI On Ubuntu 22.04

0
432
Image credit: Vecteezy

This guide shows how to install the Azure CLI on Ubuntu 22.04. Azure CLI can help you manage Azure resources using your command-line interface (CLI).

Installation and Login

01. Run the following command to run a script from Microsoft to install the CLI

$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

02. Login to azure. A URL and a code will be returned, open it in a browser.

$ az login

03. Open the link on the browser and enter the code returned in the previous step.

04. You will then be asked to enter your Azure credentials. Note that this screen might not be shown if you opened the link in an already authenticated Azure browser session and you will just need to select an account to use.

Sign-In Screen

Sign-In screen with an authenticated Azure Portal web session

05. After authentication you will be shown the following message.

06. The CLI session will now have been authenticated and will give you the following message to notify that az login command was successful.

07. Congratulations you have now installed Azure CLI and authenticated your CLI session.



For enquiries, product placements, sponsorships, and collaborations, connect with us at hello@firegulaman.com. We'd love to hear from you!