Back to DevOps Series

Networking Commands in WSL/Linux

1. ping — Test Connectivity

Loading...
  • Check whether a host is reachable.
  • Shows latency and packet loss.

2. ip — Network Information

Show network interfaces:
Loading...
Short form:
Loading...
Show interfaces:
Loading...
Show routing table:
Loading...
Show default gateway:
Loading...

3. ss — Connections & Listening Ports

Loading...
Show processes using ports:
Loading...
  • t → TCP
  • u → UDP
  • l → Listening
  • n → Numeric
  • p → Process
ss is the modern replacement for netstat.

4. netstat — Network Connections

Loading...
Show processes:
Loading...

5. curl — HTTP/API Requests

Loading...
Headers only:
Loading...
Download:
Loading...
POST request:
Loading...

6. wget — Download Files

Loading...

7. hostname — Show Hostname

Loading...
Show IP information:
Loading...

8. nslookup — DNS Lookup

Loading...
  • Finds the IP address associated with a domain.

9. dig — Detailed DNS Lookup

Loading...
Get only IP:
Loading...

10. traceroute — Trace Network Path

Loading...
  • Shows the network hops between your machine and the destination.
If unavailable:
Loading...

11. arp / ip neigh — View Local Network Neighbours

Modern command:
Loading...
  • Shows devices/neighbours known through the ARP/neighbor table.

12. nc (netcat) — Test Ports

Loading...
Example:
Loading...
  • Useful for checking whether a specific port is reachable.

13. ssh — Connect to Remote Machine

Loading...
Example:
Loading...

14. scp — Copy Files Over SSH

Copy local → remote:
Loading...
Copy remote → local:
Loading...

15. hostnamectl — System/Hostname Information

Loading...

16. whois — Domain Information

Loading...

⭐ Most Important to Remember

Command
Purpose
ping
Test connectivity
ip a
View IP/network interfaces
ip route
View routing table
ss
View ports/connections
netstat
Network connections/ports
curl
HTTP/API requests
wget
Download files
nslookup
DNS lookup
dig
Detailed DNS lookup
traceroute
Trace network path
nc
Test a port
ssh
Remote login
scp
Copy files over SSH
hostname -I
Show local IP
ip neigh
View local network neighbours
For basic Linux/DevOps, the highest-priority ones are:
ip → ping → ss → curl → wget → nslookup/dig → traceroute → ssh → scp → nc.