Learn 🧠 All Concepts (20) 🤖 What is an LLM? 📚 RAG Explained ⚡ AI Agents 💻 Run AI Locally 🇮🇳 AI in India 📖 Learn Tracks 🔧 DevOps Track ⚙️ AI Ops Track 🗺️ AI Engineer Roadmap
Tools 🔧 AI Tools Directory 🔓 Open Source AI ⭐ Top GitHub Repos ✦ Claude Skill Repos 🚀 Ready-to-Deploy Projects
Build 🏗️ Build Hub 🎯 Master Prompts 🧩 RAG Agents 🚀 App Megaprompts
Workflows ⚡ All Workflows (22) 🎥 Text to Video 🎞️ Image to Video 🔊 Text to Speech ♻️ Automation
Resources 🧪 Colab Notebooks ⚙️ n8n Workflows 📈 Algo Trading 💰 Passive Income
🗂️ Browse All Topics About AItheGuru
Learn Linux for Production Support Vijay troubleshoots the network
Linux for Production Support Ch 4 / 32 Intermediate 🪟 Windows → Linux
🌐

Vijay troubleshoots the network

ip, ss, nc, curl — Linux networking for Windows engineers

⏱ 11 min 6 commands 5 takeaways
🌐
In this chapter
Vijay
Windows support engineer, week 3 on Linux
The story

Week 3. Vijay needed to troubleshoot: App server cannot reach the database. Same problem he had solved many times on Windows. Same diagnostic logic. Different command names.

ipconfig becomes ip addr

Windows: ipconfig /all
Linux:   ip addr
ip addr show                # all interfaces (like ipconfig /all)
ip addr show eth0           # specific interface
ip route                    # routing table (like route print)
ip route show default       # default gateway (like ipconfig Default Gateway)

ping - IDENTICAL on Windows and Linux

ping server-01              # works exactly the same
ping -c 4 server-01         # stop after 4 packets (Linux runs forever without -c)

traceroute - Windows tracert renamed

Windows: tracert db-server-01
Linux:   traceroute db-server-01

nslookup - IDENTICAL on Windows and Linux

nslookup db-server-01       # works exactly the same on both
nslookup google.com 8.8.8.8 # use specific DNS server (also same)

netstat becomes ss

Windows: netstat -ano               (all connections with PID)
Linux:   ss -tlnp                   (listening ports with process)
Windows: netstat -ano | findstr :8080
Linux:   ss -tlnp | grep :8080
Windows: netstat -ano | findstr ESTABLISHED
Linux:   ss -tnp | grep ESTABLISHED
ss -tlnp                    # all listening TCP ports with process name
ss -tnp                     # all active TCP connections
ss -s                       # connection statistics summary

telnet - port testing, works the same

telnet db-server-01 5432    # test if port is reachable
# Connected = port open
# Connection refused = service not running
# Hangs with no output = firewall blocking

nc - like Test-NetConnection in PowerShell

Windows: Test-NetConnection -ComputerName db-server-01 -Port 5432
Linux:   nc -zv db-server-01 5432

curl - like Invoke-WebRequest in PowerShell

Windows: Invoke-WebRequest http://localhost:8080/health
Linux:   curl http://localhost:8080/health
curl -I http://localhost:8080/health              # headers only
curl -v http://localhost:8080/health              # verbose output
curl -s -o /dev/null -w "%{http_code}" http://url # just the status code

FIREWALL - ufw or firewalld instead of Windows Firewall

sudo ufw status                     # show all rules
sudo ufw allow 8080/tcp             # allow port 8080 inbound
sudo ufw allow from 10.0.0.0/24 to any port 5432   # allow subnet
sudo ufw deny 8080/tcp              # block port 8080

THE DIAGNOSTIC SEQUENCE - same logic, different spellings:

Step 1: Can I resolve the hostname?
Windows: nslookup db-server-01
Linux:   nslookup db-server-01    (identical)
Step 2: Can I reach the server?
Windows: ping db-server-01
Linux:   ping -c 3 db-server-01   (add -c to stop automatically)
Step 3: Can I reach the specific port?
Windows: Test-NetConnection -ComputerName db-server-01 -Port 5432
Linux:   nc -zv db-server-01 5432
Step 4: Is the service listening on that port?
Windows: netstat -ano | findstr :5432
Linux:   ss -tlnp | grep 5432
Step 5: Is the firewall blocking it?
Windows: Check Windows Firewall rules
Linux:   sudo ufw status

Vijay resolved the database connectivity issue in 11 minutes. Same diagnostic logic as Windows. Just different command spellings.

Key takeaways

ip addr replaces ipconfig, ip route replaces route print — same information, different command

ss -tlnp replaces netstat -ano — shows listening ports with process names, faster and more reliable

nc -zv host port replaces Test-NetConnection — tests if a specific port is reachable

curl replaces Invoke-WebRequest — test HTTP endpoints from the command line

ufw status replaces Windows Firewall GUI — firewall rules as text you can grep and script

Commands from this chapter
$ ip addr
ipconfig equivalent — show all network interfaces and IP addresses
$ ss -tlnp
netstat -ano equivalent — all listening ports with process names
$ ss -tlnp | grep :8080
netstat findstr equivalent — what is using port 8080
$ nc -zv hostname port
Test-NetConnection equivalent — test if port is reachable
$ curl -v http://localhost:8080/health
Invoke-WebRequest equivalent — test HTTP endpoint verbosely
$ sudo ufw status
Windows Firewall GUI equivalent — show all firewall rules