How to Launch a Linux VM on AWS EC2 – A Step-by-Step Guide for Beginners
If you're just getting started with Amazon Web Services (AWS) and want to spin up your first Linux virtual machine (VM), you’re in the right place. In this guide, we'll walk through how to create a Linux VM using Amazon EC2 (Elastic Compute Cloud) — all through the AWS Management Console.
Whether you're testing applications, learning Linux, or just experimenting with AWS cloud computing, this simple walkthrough will help you get your VM up and running quickly.
🔧 Step 1: Access the EC2 Dashboard
After logging into your AWS Console, you’ll want to head over to the EC2 Dashboard, which is where AWS manages virtual machines (called “instances”).
-
If you’ve used EC2 recently, it will show up under “Recently visited” services.
-
If not, just type “EC2” into the search bar and click the EC2 Dashboard link.
🚀 Step 2: Launch a New Instance
Once you're on the EC2 dashboard:
-
Click “Launch Instance”.
-
Give your instance a name — for example, demo-5-12.
-
Choose an Amazon Machine Image (AMI). For this tutorial, we’re going with Amazon Linux 2023, which is optimized for AWS environments.
You can also choose Ubuntu, Windows, or other AMIs, depending on your needs.
🧮 Step 3: Choose an Instance Type
Select t2.micro — it’s free tier eligible and works perfectly for lightweight use or learning purposes.
Tip: t2.nano is even smaller and still free tier eligible, but t2.micro offers a bit more headroom for experimentation.
🔑 Step 4: Create a Key Pair
You need a key pair to securely log in to your VM.
-
Click Create new key pair.
-
Name it something like demo-5-12.
-
Download the
.pem
file when prompted — you’ll need it later for SSH access via terminal or tools like PuTTY.
🌐 Step 5: Configure Network & Storage
You can accept most defaults, but be sure the following are configured:
-
Allow SSH traffic from anywhere (this is usually the default).
-
Optional: Check HTTP and HTTPS if you plan to host a web app.
-
Storage: 8GB is enough for a test VM, but you can increase it to up to 30GB and still stay in the free tier.
☁️ Step 6: Launch and Connect to Your Instance
Click “Launch Instance”, and AWS will begin provisioning your VM. It may take a minute to initialize.
To connect:
-
Click on the Instance ID to view details.
-
Click Connect.
-
Use the browser-based SSH client to open a terminal — no extra configuration required!
You’ll be logged in as the ec2-user, and from there you can start running commands, installing packages, and more.
✅ You’re All Set!
You’ve successfully launched and connected to a Linux VM on AWS! This is a great foundation for learning Linux, experimenting with web hosting, or preparing for AWS certifications.
🔜 What’s Next?
In upcoming tutorials, we’ll cover:
-
How to connect to your EC2 instance using PuTTY
-
Installing and configuring software on your Linux VM
-
Setting up web servers and deploying applications
Final Tips:
-
Always shut down unused instances to avoid charges.
-
Keep your key pairs secure — without them, you can’t access your instances.
-
Explore AWS's free tier offerings to experiment risk-free.
Tags: AWS, EC2, Linux VM, Cloud Computing, Amazon Linux, SSH, AWS Tutorial, Free Tier, Virtual Machine, Cloud Hosting