Skip to main content...
Linux + Bash Scripting
20 min

Day 12: Networking tools: ss, ip, dig, curl

The four tools that answer "is it the network?"

These are the tools you'll reach for constantly once Phase 2 gets into TCP/DNS/HTTP — get comfortable with the syntax now so the concepts land faster next phase.

ss — socket statistics (the modern netstat)
ss -tulpn          # TCP/UDP listening sockets, with process names
ss -t state established   # only established TCP connections
ip — interfaces, addresses, routes
ip addr show        # interfaces and their IP addresses
ip route show       # the routing table
dig — DNS lookups (a preview of Phase 2, Day 18)
dig example.com          # full DNS query + answer section
dig +short example.com   # just the resolved IP(s)
dig example.com MX       # mail exchange records
curl — talk HTTP directly from the command line
curl -i https://example.com          # show response headers
curl -X POST -d '{"a":1}' -H "Content-Type: application/json" https://api.example.com

Key terms

ss
Shows socket/connection state — which processes are listening on or connected via which ports.
dig
Performs and displays DNS queries in detail.

You need to find which process is listening on port 5432. Which command is designed for this?

We use cookies

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Learn more

    Day 12: Networking tools: ss, ip, dig, curl | RBTechIconX