⚙️ Azure CLI Installation

Azure CLI Installation: The Azure Portal and Azure CLI are two interfaces to the same API — the Portal is the visual dashboard a human clicks through to understand Azure, while t

The Azure Portal and Azure CLI are two interfaces to the same API — the Portal is the visual dashboard a human clicks through to understand Azure, while the CLI is the engine that a pipeline drives programmatically with no human in the loop. Think of it this way: you would not write a JUnit test that requires a developer to manually click a button in IntelliJ to proceed — the test must be fully automated and exit with a code. The same logic applies to cloud automation. But if both reach the same API, why should a QA engineer ever bother learning the CLI when the Portal is easier to click? Here is the distinction that trips up engineers new to Azure: the Portal is essential for learning and debugging (it shows you relationships between resources visually), while the CLI is essential for production pipelines (it gives you scriptable, repeatable, auditable commands). Java analogy: Portal is `jconsole` — a GUI for monitoring a running JVM; CLI is writing a `JMXConnector` call — same data, but scriptable. In practice, the QA incident that bites teams hardest is this: someone provisions a test environment in the Portal by clicking, cannot remember the exact steps 3 weeks later, and cannot reproduce the environment for the regression suite. The CLI version of that same provisioning is a 10-line bash script — committable to git, runnable by anyone.

Step 1 — Create Azure Account

Azure gives $200 free credit for the first 30 days + always-free services (Azure Functions 1M calls/month, Blob Storage 5GB). No charge if you stay within limits.

Step 2 — Install Azure CLI

How Does the az --version Output Prove the Install Actually Finished?

winget/brew/curl download the Azure CLI…

`winget install Microsoft.AzureCLI` (or brew/curl) DOWNLOADS the Azure CLI binary and ADDS it to PATH — but this does NOT mean the command WORKS yet.

az --version is the command that…

`az --version` is the command that ACTUALLY verifies the install — it tests BOTH whether the terminal's PATH can FIND the newly installed `az` AND whether the binary can RUN.

If the "azure-cli 2.x.x" output does…

If the "azure-cli 2.x.x" output does NOT appear (command not found), the problem is usually NOT the CLI itself but the terminal session not having RE-READ the new PATH yet — RESTARTING the terminal usually fixes it.

Step 3 — Login & Set Subscription

What Changes Between az login and az account set?

az login authenticates your IDENTITY…