Linux Series Day 8: Linux Networking Basics – Understand ip, ping, netstat & More


Networking is the heart of Linux systems, especially for DevOps Engineers. Whether you're connecting to a server, debugging a network issue, or configuring an IP address — Linux gives you powerful tools.
In this article, we’ll explore some basic Linux networking commands that every beginner must know!
---
🌐 1. Check Your IP Address — ip a
Instead of the old ifconfig (now deprecated), use the ip command:
ip a
🧠 What it shows:
All available network interfaces
Assigned IP addresses
Loopback interface (lo)
Ethernet or Wi-Fi adapter info
\> Bonus: To only see your IPv4 address:
ip -4 a
---
📶 2. Test Connectivity — ping
ping is the easiest way to check if your system can reach another IP or website.
ping google.com
🧠 What it shows:
Whether the host is reachable
Round-trip time (latency)
Packet loss
\> Stop the ping loop: Press Ctrl + C
---
🌍 3. View Network Routes — ip route
To see the routing table (how your machine decides where to send packets):
ip route
🧠 Use case: Helps you identify the default gateway, and which interface is used for which IP.
Example output:
default via 192.168.0.1 dev wlan0
---
📡 4. Active Network Connections — netstat or ss
🔹 netstat shows current network connections:
netstat -tuln
-t = TCP
-u = UDP
-l = Listening ports
-n = Show numbers (no domain names)
🔹 ss is the modern and faster alternative to netstat:
ss -tuln
🧠 Use case: See which services are running and on which ports.
---
🔧 5. DNS Lookup — dig & nslookup
When you want to resolve domain names to IP addresses:
dig google.com
or
nslookup google.com
🧠 Use case: Helpful when you think there’s a DNS issue or you're configuring a custom DNS.
---
🌐 6. Download from Web — curl or wget
Want to download something from a URL?
curl https://example.com
or
wget https://example.com/file.txt
---
🧪 Bonus: Monitor Traffic with tcpdump
To sniff real-time packets (requires sudo):
sudo tcpdump -i any
🧠 Use this for debugging and deep inspection, but be careful—can get overwhelming!
---
🎯 Summary Table
Command Purpose
ip a Show IP address info
ping Test connectivity
ip route View routing table
netstat/ss Show active network connections
dig / nslookup DNS lookups
curl / wget Download via terminal
tcpdump Packet monitoring/sniffing
---
🧠 Final Thoughts
As a future DevOps engineer 💻, these Linux networking tools are your eyes into the system’s communication. Whether debugging, deploying, or configuring—these commands will save your day!
---
🔜 Coming Up Next: Day 9 — [Let me know your next topic!]
If you liked this article, leave a ❤️ or drop your thoughts in the comments!
Subscribe to my newsletter
Read articles from Fiza_devops_lover_540 directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Fiza_devops_lover_540
Fiza_devops_lover_540
> "Learning Linux, Git, and Shell scripting on my path to becoming a DevOps Engineer. Sharing my tech journey step by step." "Aspiring DevOps Engineer on a journey from Git to the Cloud. Learning Linux, mastering Shell scripting, and exploring automation one command at a time. Sharing my DevOps learning path and experiences as I grow."