Azure CLI is a command-line tool that lets you manage Azure resources using simple commands from your computer or Cloud Shell.
Click to reveal answer
beginner
What is Azure Cloud Shell?
Azure Cloud Shell is a browser-based shell environment hosted by Microsoft that provides Azure CLI and other tools without needing local installation.
Click to reveal answer
beginner
How do you start Azure Cloud Shell?
You can start Azure Cloud Shell by clicking the shell icon in the Azure portal or by visiting shell.azure.com in a web browser.
Click to reveal answer
intermediate
Why use Azure CLI instead of the Azure portal?
Azure CLI allows automation, scripting, and faster management of resources, especially useful for repetitive tasks or managing many resources.
Click to reveal answer
intermediate
What shell environments does Azure Cloud Shell support?
Azure Cloud Shell supports Bash (Linux shell) and PowerShell, letting you choose the environment you prefer.
Click to reveal answer
Which tool allows you to manage Azure resources from a web browser without installing anything?
AAzure Cloud Shell
BAzure CLI installed locally
CAzure Portal mobile app
DAzure Storage Explorer
✗ Incorrect
Azure Cloud Shell runs in the browser and provides Azure CLI without local installation.
What command starts the Azure CLI in Cloud Shell?
AIt starts automatically when you open Cloud Shell
Baz start
Cstart-azure
Dcli launch
✗ Incorrect
Azure CLI is ready to use immediately when you open Cloud Shell; no command needed to start it.
Which shell environments can you choose in Azure Cloud Shell?
APowerShell and Command Prompt
BCommand Prompt and Bash
CZsh and Fish
DBash and PowerShell
✗ Incorrect
Azure Cloud Shell supports Bash (Linux shell) and PowerShell environments.
What is a main advantage of using Azure CLI over the Azure portal?
AMore colorful interface
BBetter graphics
CAutomation and scripting
DRequires no login
✗ Incorrect
Azure CLI allows automation and scripting, which is faster for repetitive tasks.
Where can you access Azure Cloud Shell?
AOnly on Windows computers
BAzure portal and shell.azure.com
COnly through Visual Studio
DOnly on mobile apps
✗ Incorrect
Azure Cloud Shell is accessible via the Azure portal or directly at shell.azure.com.
Explain what Azure CLI and Azure Cloud Shell are and how they help manage Azure resources.
Think about tools that let you control Azure from commands and where you can run them.
You got /4 concepts.
Describe the benefits of using Azure Cloud Shell compared to installing Azure CLI locally.
Consider convenience and accessibility when using Cloud Shell.
You got /5 concepts.
Practice
(1/5)
1. What is the primary purpose of Azure Cloud Shell?
easy
A. To store files permanently in Azure storage
B. To create virtual machines automatically without commands
C. To replace the Azure Portal with a graphical interface
D. To provide a ready-to-use command line interface in the browser with Azure CLI pre-installed
Solution
Step 1: Understand Cloud Shell functionality
Cloud Shell is a browser-based shell environment with Azure CLI and other tools pre-installed, ready for use without setup.
Step 2: Compare options
Options B, C, and D describe other Azure features but not Cloud Shell's main purpose.
Final Answer:
To provide a ready-to-use command line interface in the browser with Azure CLI pre-installed -> Option D
Quick Check:
Cloud Shell = browser CLI with Azure CLI [OK]
Hint: Cloud Shell = browser command line ready to use [OK]
Common Mistakes:
Thinking Cloud Shell is a GUI tool
Confusing Cloud Shell with Azure Portal
Assuming Cloud Shell stores files permanently
2. Which command correctly logs you into Azure CLI in Cloud Shell?
easy
A. az connect
B. az login
C. az start
D. az authenticate
Solution
Step 1: Identify the login command in Azure CLI
The command to log in to Azure CLI is az login.
Step 2: Verify other options
Commands like az connect, az start, and az authenticate do not exist or are incorrect for login.
Final Answer:
az login -> Option B
Quick Check:
Login command = az login [OK]
Hint: Login always uses 'az login' command [OK]
Common Mistakes:
Using 'az connect' instead of 'az login'
Trying 'az start' to login
Assuming 'az authenticate' is valid
3. What will the following command do?
az group create --name MyResourceGroup --location eastus
medium
A. Create a new resource group named MyResourceGroup in the East US region
B. Delete the resource group named MyResourceGroup
C. List all resource groups in East US
D. Create a virtual machine named MyResourceGroup
Solution
Step 1: Understand the command structure
az group create creates a resource group. The parameters specify the name and location.
Step 2: Interpret parameters
--name sets the resource group name to 'MyResourceGroup', --location sets the region to 'eastus'.
Final Answer:
Create a new resource group named MyResourceGroup in the East US region -> Option A
Quick Check:
az group create = create resource group [OK]
Hint: az group create = make new resource group [OK]
Common Mistakes:
Confusing resource group creation with VM creation
Thinking it deletes or lists groups
Misunderstanding --location parameter
4. You run this command in Cloud Shell:
az vm create --resource-group MyGroup --name MyVM --image UbuntuLTS
But get an error saying the resource group does not exist. What should you do?
medium
A. Create the resource group first using az group create
B. Change the VM name to match an existing resource group
C. Run az vm delete before creating the VM
D. Use az vm list to create the resource group
Solution
Step 1: Understand the error cause
The error says the resource group 'MyGroup' does not exist, so the VM cannot be created there.
Step 2: Fix by creating the resource group
You must create the resource group first with az group create --name MyGroup --location eastus (or another location).
Final Answer:
Create the resource group first using az group create -> Option A
Quick Check:
Resource group must exist before VM creation [OK]
Hint: Create resource group before VM creation [OK]
Common Mistakes:
Trying to delete VM before creating resource group
Changing VM name instead of resource group
Using az vm list to create groups
5. You want to automate creating a VM and then immediately open its public IP in your browser using Azure CLI in Cloud Shell. Which sequence of commands is correct?
hard
A. az vm create --resource-group RG --name VM1 --image UbuntuLTS && az vm get-ip VM1 | open-browser
B. az vm create --resource-group RG --name VM1 --image UbuntuLTS; az vm list-ip --name VM1 | open
C. az vm create --resource-group RG --name VM1 --image UbuntuLTS && az vm show --resource-group RG --name VM1 --query publicIpAddress -o tsv | xargs xdg-open
D. az vm create --resource-group RG --name VM1 --image UbuntuLTS && az vm show --resource-group RG --name VM1 --query publicIpAddress -o tsv | xargs open
Solution
Step 1: Create VM with az vm create
This command creates the VM in the specified resource group with the Ubuntu image.
Step 2: Retrieve public IP and open in browser
az vm show --query publicIpAddress -o tsv extracts the IP. Piping to xdg-open opens it in the default browser on Linux-based Cloud Shell.
Step 3: Analyze options
Options B and C use invalid commands or syntax. az vm create --resource-group RG --name VM1 --image UbuntuLTS && az vm show --resource-group RG --name VM1 --query publicIpAddress -o tsv | xargs open uses open which is MacOS-specific, not Cloud Shell.
Final Answer:
az vm create ... && az vm show ... | xargs xdg-open -> Option C
Quick Check:
Use az vm show + xdg-open in Cloud Shell [OK]
Hint: Use az vm show + xdg-open to open IP in Cloud Shell [OK]
Common Mistakes:
Using MacOS 'open' command in Cloud Shell
Using non-existent commands like az vm get-ip
Not piping IP correctly to open command
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.