Command library / traceroute
traceroute
Show the network path (hop by hop) to a host
Reveals every router your traffic passes through to reach a destination, and how long each hop takes — so you can see exactly WHERE a connection is slow or dying, not just THAT it is.
Practice tracerouteUsage
Options and flags
hostdestination host name or IP address
-mNmaximum number of hops to probe (default 30)
-wSECONDStimeout in seconds to wait for each response
-nshow IP addresses only, skip the (slow) reverse-DNS lookups
Examples
traceroute example.comEvery router between you and example.com, with timing for each.
traceroute -n example.comSame trace, but faster — skips resolving each hop's hostname.
traceroute -m 15 example.comStop probing after 15 hops instead of the default 30 — quicker when you only care about the first stretch.
Common mistakes
traceroute always needs a destination host as its last argument — without one there's no path to trace.