Networking Section
This section covers the Linux tools for working with networks: finding out what addresses your machine has, checking whether another host is reachable, downloading files over the web, translating domain names into IP addresses, and watching the traffic itself. Everything here ships with Linux by default or installs from any distribution’s package manager.
If you have never looked “under the hood” of your internet connection, this is the section that will. Each tool is introduced with a scenario first, then the commands you will actually type.
How the Pieces Fit Together
A network connection on Linux is built from a few layers, and each tool in this section works at one of them:
| Layer | What it is | Tools in this section |
|---|---|---|
| Interface | The hardware (or virtual) port your machine connects through | ip, ifconfig |
| Reachability | Whether another machine answers at all | ping, traceroute |
| Translating names | Turning example.com into an IP address and back | dig, nslookup, host |
| Transferring data | Actually moving files over HTTP, FTP, and friends | curl, wget |
| Sockets and traffic | What connections and packets your machine has open | ss, netstat, tcpdump, nc |
When something “isn’t working on the network”, these layers give you a checklist: check the interface (ip), check reachability (ping), check name resolution (dig), then check the connection itself (ss or tcpdump).
Tools in This Section
| Page | What it does | Reach for it when |
|---|---|---|
ip | Show and configure interfaces, addresses, and routes | You need to know your own IP or fix a network interface |
ifconfig | The older interface viewer/configurator | You are on an old tutorial or legacy server that still uses it |
ping | Send test packets and measure the round trip | You want to know if a host is up and how fast it answers |
curl | Transfer data with URLs — HTTP, FTP, and dozens more | You are calling an API or downloading from a script |
wget | Non-interactive downloading, with resume and mirroring | You are grabbing whole files or directories |
ss | Show open sockets and listening ports | You want to know what is connected or listening right now |
netstat | The older socket and routing statistics tool | Legacy scripts and tutorials reference it |
dig | Query DNS records in detail | You are debugging why a name resolves (or doesn’t) |
nslookup | Quick interactive name lookup | You want a fast answer on any system |
host | Simple DNS lookups with terse output | You want the IP of a name in one short line |
traceroute | Show every hop a packet takes to a destination | You are debugging where the connection breaks |
tcpdump | Capture and inspect raw network traffic | You need to see exactly what is on the wire |
nc | Read and write raw connections — the networking swiss army knife | You are testing a port, or piping data between machines |
A Worked Example: “The Website Is Down”
A realistic troubleshooting flow using this section’s tools, in order:
# 1. Is my own network up? Check my interface and address.
ip addr show
# 2. Can I reach a known-good host by name?
ping -c 3 example.com
# 3. Ping worked by name, but my target's name fails? Check DNS.
dig example.org
# 4. Name resolves, but the site still fails? Is the port open?
nc -zv example.org 443
# 5. Everything looks fine but data is missing? Ask the server directly.
curl -I https://example.org
Each step narrows the problem down. This exact sequence — interface, reachability, DNS, port, application — is how network engineers debug, and it is worth memorizing.
Why This Matters
- Servers are accessed over networks — every tool in this section assumes you will eventually log into a remote machine and debug its connection from the shell.
- Debugging is a layered process — knowing which tool answers which question (“is DNS broken or is the server down?”) saves hours.
- These tools appear in scripts everywhere —
curlandncin particular show up in setup scripts, health checks, and CI pipelines that you will read and write.
The tools in this section get more useful the more you use them. Start with
ipandpingto answer “what is my address and can I reach things?”, then move tocurl,dig, andncas you start building scripts and debugging real problems.