Wednesday, July 20, 2022

Azure Cli Installation in Ubuntu (Debian)

The Azure CLI is a cross-platform command-line tool that can be installed locally on Linux computers. You can use the Azure CLI on Linux to connect to Azure and execute administrative commands on Azure resources. The CLI on Linux allows the execution of various commands through a terminal using interactive command-line prompts or a script.

Step 1:  Get packages needed for the install process
   $ sudo apt-get update
   $ sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
   
Step 2: Download and install the Microsoft signing key

$ sudo curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null
Step 3: Add the Azure CLI software repository

$ sudo 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
Step 4: Update repository information and install the azure-cli package
$ sudo apt-get update $ sudo apt-get install azure-cli
Step 5: Check the Azure cli version installed
$ az --version

Ref: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots= apt

No comments:

Post a Comment

Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...