0
0
Azurecloud~5 mins

Why Azure for cloud computing - Why It Works

Choose your learning style9 modes available
Introduction
Choosing a cloud provider can be confusing. Azure helps by offering easy tools to run your apps and store data without buying physical servers.
When you want to quickly create and manage virtual machines without hardware.
When you need to store files and databases safely in the cloud.
When you want to build apps that can grow automatically as more people use them.
When you want to connect your existing Microsoft software with cloud services.
When you want to use ready-made AI and analytics tools without setting them up yourself.
Commands
This command logs you into your Azure account so you can start managing resources.
Terminal
az login
Expected OutputExpected
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ABCD1234 to authenticate. You have logged in. Now let us find all the subscriptions to which you have access...
Creates a group to hold your cloud resources in the East US region. Groups help organize and manage resources together.
Terminal
az group create --name myResourceGroup --location eastus
Expected OutputExpected
{ "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup", "location": "eastus", "name": "myResourceGroup", "properties": { "provisioningState": "Succeeded" }, "tags": {}, "type": "Microsoft.Resources/resourceGroups" }
--name - Sets the name of the resource group
--location - Sets the Azure region for the group
Creates a virtual machine running Ubuntu Linux in your resource group with a user and SSH keys for secure access.
Terminal
az vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys
Expected OutputExpected
{ "fqdns": "", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", "location": "eastus", "name": "myVM", "powerState": "VM running", "privateIpAddress": "10.0.0.4", "publicIpAddress": "52.170.12.34", "resourceGroup": "myResourceGroup", "zones": "" }
--resource-group - Specifies the group to place the VM in
--name - Names the virtual machine
--image - Chooses the operating system image
--admin-username - Sets the admin user name
--generate-ssh-keys - Creates SSH keys for secure login
Lists all your virtual machines with details like status and IP addresses in a readable table format.
Terminal
az vm list -d -o table
Expected OutputExpected
Name ResourceGroup Location Zones PowerState PublicIps PrivateIps ------ --------------- ---------- ------- ------------ ------------ ------------ myVM myResourceGroup eastus VM running 52.170.12.34 10.0.0.4
-d - Shows instance view with power state
-o - Formats output
Key Concept

If you remember nothing else, remember: Azure lets you create and manage cloud resources easily with simple commands and ready tools.

Common Mistakes
Not logging in before running commands
Commands fail because Azure needs your account to know what you can access.
Always run 'az login' first to authenticate.
Using a resource group name that already exists in another subscription
Resource group names must be unique within your subscription to avoid conflicts.
Choose a unique resource group name or check existing groups with 'az group list'.
Forgetting to generate SSH keys or provide credentials when creating a VM
Without credentials, you cannot securely access your virtual machine.
Use '--generate-ssh-keys' or specify your own keys or passwords.
Summary
Use 'az login' to sign in to your Azure account before managing resources.
Create a resource group to organize your cloud resources in a specific region.
Create virtual machines with simple commands including OS choice and secure access setup.
List your virtual machines to check their status and IP addresses.