Connected to an EC2 Instance Using SSH. Now What?
π§ Big Picture First
At this point, youβve already:
- Created an EC2 instance
- Connected to it via SSH
Now youβre inside the server. Before installing anything or making changes, you need to understand what youβre running.
π§± Phase 1 β Identify the System
1οΈβ£ Check the OS & Kernel
uname -a
Purpose
Identify OS type
Kernel version
Architecture
Environment (AWS)
Why it matters
Determines which tools you use (
dnf,systemctl)Avoids wrong commands (e.g.,
apton Amazon Linux)
π¦ PHASE 2 β Package Management Basics
2οΈβ£ Update system packages
sudo dnf update
Purpose
Bring all installed software up to date
Apply security patches
Why it matters
Security
Stability
Best practice on new servers
3οΈβ£ Query installed kernel
rpm -q kernel
Purpose
- Check kernel version via package database
Why it matters
Kernel is installed like any other package
Helps during upgrades & debugging
4οΈβ£ Install nginx
sudo dnf install nginx
Purpose
- Download and install nginx from trusted repos
Why it matters
Teaches how software is installed properly
Dependency resolution happens automatically
5οΈβ£ Verify nginx is installed
rpm -q nginx
Purpose
- Confirm nginx exists at the RPM level
Why it matters
Installation β running
Always verify installs
βοΈ PHASE 3 β Service Management (systemd)
6οΈβ£ Check nginx service status
sudo systemctl status nginx
Purpose
Show whether nginx is running
Show logs, PID, uptime, config validation
Why it matters
- Services must be monitored, not assumed
7οΈβ£ Start nginx (if needed)
sudo systemctl start nginx
Purpose
- Start the nginx service
Why it matters
- Installed services donβt auto-run
π PHASE 4 β Verify Functionality
π Test locally
curl localhost
Purpose
- Verify nginx responds internally
Why it matters
- Separate Linux issues from AWS networking issues
π (AWS) Open port 80
Action
- Security Group β Allow HTTP (80)
Purpose
- Allow external traffic
Why it matters
- AWS firewall blocks traffic by default
π PHASE 5 β Understand Configuration Safely
1οΈβ£1οΈβ£ View nginx config safely
sudo less /etc/nginx/nginx.conf
Purpose
- Read main nginx config (read-only)
Why it matters
Understand before modifying
Avoid breaking production configs
π§ KEY CONCEPTS YOUβVE LEARNED (WITHOUT NOTICING)
You now understand:
Linux kernel vs OS
Package managers (
dnf,rpm)Installed vs running software
systemd & services
Safe config inspection
Zero-downtime reloads
Cloud networking basics
Production hygiene
This is real DevOps knowledge, not theory.
π§© MENTAL MODEL (VERY IMPORTANT)
EC2 instance
βββ Linux OS
β βββ kernel (rpm)
β βββ packages (dnf)
β βββ services (systemctl)
β
βββ nginx installed (rpm)
βββ nginx running (systemd)
βββ nginx configured (/etc/nginx)
βββ traffic allowed (AWS SG)
π― WHERE YOU ARE NOW
You are exactly at:
βI can operate and reason about a Linux service on the cloud.β
Thatβs the foundation of:
Docker
Kubernetes
CI/CD
SRE
Platform engineering
Top comments (0)