Creating a Linux virtual machine (VM) in Microsoft Azure is straightforward and a great way to get hands-on experience with cloud infrastructure. In this guide, you’ll also learn how to install and run the Nginx web server on your new VM.
☁️ Step 1: Log in to Azure Portal
Visit https://portal.azure.com and log in with your Microsoft account.
🔍 Step 2: Search for "Virtual Machines"
In the Azure Portal search bar, type Virtual Machines and select the service.
➕ Step 3: Create a Virtual Machine
Click "Create" > "Virtual machine".
🧩 Step 4: Configure the Basics
On the Basics tab, fill in the following:
Subscription: Select your active subscription.
Resource Group: Create or select a resource group.
Virtual Machine Name: Example:linux-nginx-vm
Region: Choose a location close to you.
Image: Select Ubuntu Server 20.04 LTS.
Size: Choose a small instance likeStandard_B1s.
Authentication: Choose SSH public key or password.
⚠️ Make sure to allow HTTP and SSH ports in the “Inbound port rules.”
🔐 Step 6: Access the VM via SSH
Find your VM’s public IP address from the Azure dashboard. Then connect using your terminal:
bash
ssh azureuser@<your-public-ip>