Trace the network path to a host, hop by hop.
low risk
traceroute sends packets with incrementing TTL values to discover each router hop between source and destination. Reveals routing paths, identifies where packets are dropped, and measures latency at each hop — essential for network troubleshooting.
| Flag | Meaning |
|---|---|
-n --numeric | Don't resolve hostnames (faster) |
-T --tcp | Use TCP SYN probes (bypasses ICMP blocks) |
-p --port | Destination port for TCP/UDP probes |
-m --max-hops | Maximum number of hops |
traceroute 8.8.8.8Trace route to Google DNS · explain & risk-check →traceroute -n google.comTrace without DNS resolution (faster output) · explain & risk-check →traceroute -T -p 443 api.service.comTCP trace to HTTPS port (works through firewalls) · explain & risk-check →Use `traceroute -T -p 443` when ICMP is blocked — TCP SYN probes on the target port actually follow the production traffic path and bypass ICMP-blocking firewalls.
Reference text is hand-written and may be incomplete — check man traceroute for your version. Test destructive commands on a non-production system first.