Install the Azure CLI

To connect to Azure Cloud and manage Azure resources directly from the command line of your host system, you can use the Azure command-line interface (CLI).

Before you begin

Procedure

  1. Import the Microsoft repository key:
    $ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  2. Create a local Azure CLI repository entry:
    $ sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
  3. Update the dnf package index:
    $ sudo dnf update
  4. Install the Azure CLI:
    $ sudo dnf install -y azure-cli
  5. Run the Azure CLI:
    $ az login

Results

  • Verify that the Azure CLI is installed and running:
    $ az --version

What to do next