$ -weight: 500;">brew -weight: 500;">update
-weight: 500;">brew -weight: 500;">update
-weight: 500;">brew -weight: 500;">update
-weight: 500;">brew -weight: 500;">install azure-cli
-weight: 500;">brew -weight: 500;">install azure-cli
-weight: 500;">brew -weight: 500;">install azure-cli
az account list --output table
az account set --subscription "Your-Subscription-Name"
az account list --output table
az account set --subscription "Your-Subscription-Name"
az account list --output table
az account set --subscription "Your-Subscription-Name"
az group create --name MyLabGroup --location eastus
az group create --name MyLabGroup --location eastus
az group create --name MyLabGroup --location eastus
az network vnet create \ --resource-group MyLabGroup \ --name MyVNet \ --address-prefix 10.0.0.0/16 \ --subnet-name MySubnet \ --subnet-prefix 10.0.1.0/24
az network vnet create \ --resource-group MyLabGroup \ --name MyVNet \ --address-prefix 10.0.0.0/16 \ --subnet-name MySubnet \ --subnet-prefix 10.0.1.0/24
az network vnet create \ --resource-group MyLabGroup \ --name MyVNet \ --address-prefix 10.0.0.0/16 \ --subnet-name MySubnet \ --subnet-prefix 10.0.1.0/24
az vm create \ --resource-group MyLabGroup \ --name MyLinuxVM \ --image Ubuntu2204 \ --vnet-name MyVNet \ --subnet MySubnet \ --admin-username azureuser \ --generate-ssh-keys \ --public-ip-sku Standard
az vm create \ --resource-group MyLabGroup \ --name MyLinuxVM \ --image Ubuntu2204 \ --vnet-name MyVNet \ --subnet MySubnet \ --admin-username azureuser \ --generate-ssh-keys \ --public-ip-sku Standard
az vm create \ --resource-group MyLabGroup \ --name MyLinuxVM \ --image Ubuntu2204 \ --vnet-name MyVNet \ --subnet MySubnet \ --admin-username azureuser \ --generate-ssh-keys \ --public-ip-sku Standard
ssh azureuser@<YOUR_PUBLIC_IP>
ssh azureuser@<YOUR_PUBLIC_IP>
ssh azureuser@<YOUR_PUBLIC_IP> - Open Terminal: Press Cmd + Space, type "Terminal," and hit Enter.
- Update Homebrew: Ensure your package manager is current. - Install Azure CLI: - Login to Azure:
Run the following command. It will automatically open your default web browser (Safari/Chrome). - Pro Tip: If your browser doesn't open or you are on a remote server, use az login --use-device-code. - Set your Subscription: If you have multiple accounts, list them and select the correct one: - --name: The identifier for your group.
- --location: Choose a region close to you (e.g., eastus, westeurope, southeastasia). - 10.0.0.0/16: This is your private "building."
- 10.0.1.0/24: This is a specific "room" (subnet) within that building where your VM will live. - --generate-ssh-keys: This is the "Magic Mac" flag. It looks in your ~/.ssh folder for a key; if it doesn't find one, it creates one for you automatically.
- --public-ip-sku Standard: Assigns a static-capable IP so you can reach the machine from your laptop.