Azure Virtual Machines – Basics
Welcome to the Azure Virtual Machines (VM) basics tutorial. In this guide you will learn how to create, configure, and manage a Linux virtual machine using the Azure portal.
Prerequisites
- An active Azure subscription.
- Basic knowledge of Linux command line.
- A modern web browser.
Step 1 – Create a Virtual Machine
- Sign in to the Azure portal.
- In the left navigation pane, select Virtual machines → Create → Virtual machine.
- Fill out the form:
- Subscription: Choose your subscription.
- Resource group: Create a new group (e.g.,
VmBasicsRG) or select an existing one. - Virtual machine name:
myFirstVM - Region: Select a region close to you.
- Image: Choose
Ubuntu Server 22.04 LTS. - Size: Select
Standard B1s(free tier eligible).
- Under Administrator account, set a username and either an SSH public key or a password.
- Leave the default networking settings or configure a new virtual network if needed.
- Click Review + create, then Create.
Step 2 – Connect to Your VM
After the deployment succeeds, connect via SSH:
ssh <username>@<public-ip-address>
Step 3 – Install a Web Server
Run the following commands on your VM to install Nginx:
sudo apt update
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
Verify by navigating to the VM's public IP address in your browser. You should see the default Nginx welcome page.
Next Steps
- Explore advanced VM configurations.
- Learn how to set up Azure networking for secure access.
- Back to tutorial overview.