tracepath – Trace the routing information of the destination host

The tracepath command is a Linux utility used to trace the route that packets take from the local host to a destination host. It is similar to the traceroute command, but with a slightly different output format.


The basic syntax for the tracepath command is as follows:

tracepath [options] destination

Where destination is the IP address or hostname of the target host. By default, tracepath will send packets with a Time-to-Live (TTL) value of 1 and increment the TTL value by 1 until the target host is reached or the maximum number of hops is reached.

The output of the tracepath command includes the IP addresses and hostnames of each hop along the way, as well as the round-trip time (RTT) for each hop. The output is similar to the following:

 1:  localhost.localdomain                          0.027ms pmtu 1500
 1:                                     1.245ms 
 2:                                         2.345ms 
 3:                                     3.456ms 
 4:                                     4.567ms 
 5:                                     5.678ms 
 6:                                     6.789ms 
 7:                                     7.890ms 
 8:                                     8.901ms 
 9:                                     9.012ms 
10:  destination                                      10.123ms reached

In this example, the packets first travel to the local router (, then through several other routers before reaching the destination host.


To trace the route to the domain:


To specify a maximum number of hops:

tracepath -m 10

To use a specific network interface:

tracepath -i eth0


The following table lists the available options for the tracepath command:

Option Description
-4 Force the use of IPv4
-6 Force the use of IPv6
-b Print both hostname and IP address
-d Enable debugging output
-f Start the trace with a specific TTL value
-i Use a specific network interface
-m Set the maximum number of hops
-n Do not resolve hostnames
-p Use a specific source port
-q Set the number of probes per hop
-r Bypass the normal routing tables
-s Set the size of the packets
-t Set the type of service (TOS) field

Troubleshooting tips

If you are having trouble running the tracepath command, try the following:

  • Ensure that the target host is reachable and responding to ICMP packets.
  • Check that you have permission to use the tracepath command (i.e. you are running as root or have the necessary permissions).
  • Try using the traceroute command instead, as it may provide more detailed output or work better with certain network configurations.


  • The tracepath command may not be installed on all Linux distributions by default. Check your distribution’s documentation for information on how to install it.
  • Some network configurations may block ICMP packets, which can result in incomplete or inaccurate output from the tracepath command.