Welcome to the Azure CLI. We're glad you're here! You chose a tool that allows you to create, update, and delete Azure resources from a command-line. In this tutorial, you'll onboard with the Azure CLI and learn the following skills that help you to be successful in your Azure CLI journey:
1 - Get to know the Azure CLI (in this tutorial step)
The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Azure and execute administrative commands on Azure resources. It allows the execution of commands through a terminal using interactive command-line prompts or a script.
For interactive use, first launch a shell such as Bash, PowerShell, or Cmd.exe on Windows, Linux or macOS. Then issue a command at the shell prompt. To automate repetitive tasks, assemble the Azure CLI commands into a shell script using the script syntax of your chosen shell, and then execute the script.
What shell environment should I use?
Windows PowerShell, PowerShell, Cmd, and Bash are different shell environments. Your shell environment not only determines which tools you can use, but your shell also changes your command-line experience. For example, there are important quoting differences, line continuation characters, and variable syntax differences between shells.
The Azure CLI reference examples in this tutorial are written for Bash, PowerShell and Cmd to help you evaluate each shell experience. Here's a brief comparison:
Shell environment
Can I use Azure CLI?
Can I use Azure PowerShell?
CMD
Yes
Bash
Yes
Windows PowerShell
Yes
Yes
PowerShell
Yes
Yes
Azure Cloud Shell is a hosted shell environment that runs on an Ubuntu container. Cloud Shell provides two shell environments: Bash (with Azure CLI preinstalled) and PowerShell (with Azure PowerShell preinstalled).
How does the Azure CLI compare to Azure PowerShell?
Azure CLI and Azure PowerShell are both command-line tools that enable you to create and manage Azure resources, but they're distinctly different. Here's a brief comparison of the two tools:
Compare
Azure CLI
Azure PowerShell
What is it?
Cross-platform command-line interface
Cross-platform PowerShell module
Built on
Python
PowerShell
Install on
Windows, macOS, Linux
Windows, macOS, Linux
Run in
Bash shell, PowerShell 5 or 7, Windows Cmd.exe, Azure Cloud Shell, Docker container, and other Unix shells.
Windows PowerShell, PowerShell, Azure Cloud Shell, Docker container
Terms
Reference groups, reference subgroups and reference commands
All Azure CLI reference commands are one of two reference types:
Core components of the Azure CLI are part of the primary Azure CLI service and ship from Microsoft on a release schedule.
Extensions aren't shipped as part of the core Azure CLI but they run as CLI commands. With extensions, you gain access to experimental and prerelease commands along with the ability to write your own CLI interfaces. You're prompted to install an extension on first use.
Now that you've learned about shell environments and Azure CLI syntax, proceed to the next step to prepare your environment and execute your first Azure CLI reference command.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback:
Learn the basic concepts of infrastructure as code, explore the key differences between the Azure CLI, Azure PowerShell, Bicep, and Terraform, and decide which command-line tools best meet your organization's needs.