Hands-on With Networking Commands


Today marks Day 4 of my #90DaysOfDevOps journey — and it was a full hands-on session! I connected to my Ubuntu EC2 instance on AWS and practiced six essential networking commands that every DevOps engineer must be comfortable with.
Whether you're debugging connectivity issues, verifying deployments, or performing DNS lookups — these commands are your go-to tools in the DevOps world.
What I Did:
Connected securely to my EC2 instance via SSH from Windows
Installed missing utilities (net-tools, traceroute, etc.)
Practiced each command with real examples
Created a cheat sheet for future reference
Cheat Sheet: Common Networking Commands
Ping
Use: Test if a server or website is reachable.
ping google.com -c 5
Sends5 ICMP packets to Google to check connectivity
Traceroute
Use: Trace the route taken by packets to reach a destination.
traceroute Google.com
Diplays each network hop between the EC2 instance and Google
To install:
sudo apt install traceroute -y
curl
Use: Send HTTP requests to test APIs and endpoints.
curl -I https://example.com (# Show headers only)
curl https://ifconfig.me (# Shows your instance's public IP)
curl -X POST -d '{"status":"ok"}' https://api.example.com/webhook
react for API testing, webhooks, CI/CD integrations.
netstat
Use: View open ports and active services.
sudo netstat -tulnp
Shows listening to ports and running services with PID.
To install:
sudo apt install net-tools -y
dig
Use: Perform detailed DNS lookups.
dig google.com
dig +short google.com
Shows IP, DNS servers, TTL, and more.
Installed by default on most Ubuntu images
nslookup
Use: Another DNS resolution tool (simpler output).
nslookup google.com
- Good for quick IP checks of a domain.
All Tested On:
EC2 Ubuntu 22.04 LTS (t2. micro – Free Tier)
Configured Security Groups for safe access
Learning these tools hands-on showed me how often we need them in real world DevOps Tasks — like debugging CI/CD Pipelines, verifying microservice availability, or checking DNS resolution issue.
Next up — I’ll revise all week’s topics, write a weekly summary, and share my learning progress publicly.
STAY CONNECTED
Subscribe to my newsletter
Read articles from Asim Khot directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
