Vijay troubleshoots the network
ip, ss, nc, curl — Linux networking for Windows engineers
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 addrip 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-01nslookup - 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 :8080Windows: netstat -ano | findstr ESTABLISHED
Linux: ss -tnp | grep ESTABLISHEDss -tlnp # all listening TCP ports with process name
ss -tnp # all active TCP connections
ss -s # connection statistics summarytelnet - 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 blockingnc - like Test-NetConnection in PowerShell
Windows: Test-NetConnection -ComputerName db-server-01 -Port 5432
Linux: nc -zv db-server-01 5432curl - like Invoke-WebRequest in PowerShell
Windows: Invoke-WebRequest http://localhost:8080/health
Linux: curl http://localhost:8080/healthcurl -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 codeFIREWALL - 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 8080THE 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 5432Step 4: Is the service listening on that port?
Windows: netstat -ano | findstr :5432
Linux: ss -tlnp | grep 5432Step 5: Is the firewall blocking it?
Windows: Check Windows Firewall rules
Linux: sudo ufw statusVijay resolved the database connectivity issue in 11 minutes. Same diagnostic logic as Windows. Just different command spellings.
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