Network

The traceroute command

Shows the path a packet travels to its destination, hop by hop.

Syntax

traceroute <host>

Most useful options

-nDoes not resolve names, goes faster
-m NMaximum hops

Copy-ready examples

$ traceroute miguelacm.esThe path to the server
$ traceroute -n 8.8.8.8Without resolving names, faster

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It is the tool to find where a connection breaks.

Related commands

FAQ

Why look at the hops?

To know if the problem is in your network or beyond.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course