zaro

Where is Azure CLI?

Published in Azure CLI Location 2 mins read

The Azure CLI, an essential command-line tool for managing Azure resources, is installed in specific locations on your system, which vary depending on your operating system and its architecture.

Understanding Azure CLI Installation Paths

Knowing where the Azure CLI is installed can be helpful for various reasons, such as troubleshooting, managing system paths, or understanding how the tool integrates with your environment. The installation directory is typically chosen to align with standard software installation practices on each operating system.

Azure CLI Locations by Operating System

Below is a detailed breakdown of the common installation directories for Azure CLI on both Windows and various Linux distributions.

Operating System Architecture Installation Path
Windows 32-bit C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2
Windows 64-bit C:\Program Files\Microsoft SDKs\Azure\CLI2
Linux Ubuntu, Debian /opt/az/
Linux CentOS Stream, RHEL, Azure Linux /lib64/az/

Windows Installations

On Windows, the Azure CLI typically resides within the Program Files directory structure, which is standard for most applications. The distinction between Program Files and Program Files (x86) accounts for 64-bit and 32-bit applications, respectively, ensuring compatibility and proper system integration.

  • For 32-bit installations, the path is C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2. This folder is dedicated to 32-bit applications running on a 64-bit Windows system.
  • For 64-bit installations, the path is C:\Program Files\Microsoft SDKs\Azure\CLI2. This is the primary directory for 64-bit applications.

Linux Installations

On Linux, the installation paths follow common Unix-like system conventions:

  • /opt/az/: This directory is often used for optional or add-on software that is not part of the standard system distribution. Ubuntu and Debian-based systems commonly install Azure CLI here.
  • /lib64/az/: This path is found on systems like CentOS Stream, Red Hat Enterprise Linux (RHEL), and Azure Linux. The /lib64 directory typically contains essential shared libraries for 64-bit programs.

For more information on installing the Azure CLI and its system requirements, you can refer to the official Microsoft Learn documentation on installing Azure CLI.