Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

traceroute command in Linux with Examples

  • Difficulty Level : Easy
  • Last Updated : 27 May, 2019

traceroute command in Linux prints the route that a packet takes to reach the host. This command is useful when you want to know about the route and about all the hops that a packet takes. Below image depicts how traceroute command is used to reach the Google( host from the local machine and it also prints detail about all the hops that it visits in between.

The first column corresponds to the hop count. The second column represents the address of that hop and after that, you see three space-separated time in milliseconds. traceroute command sends three packets to the hop and each of the time refers to the time taken by the packet to reach the hop.


traceroute [options]  host_Address [pathlength]


  • -4 Option: Use ip version 4 i.e. use IPv4


    $ traceroute -4 10

  • -6 Option: Use ip version 6 i.e. use IPv6


    $ traceroute -6 10

  • -F Option: Do not fragment packet.


    $ traceroute -F

  • -f first_ttl Option: Start from the first_ttl hop (instead from 1).


    $ traceroute -f 10

  • -g gate Option: Route the packet through gate.


    $ traceroute -g

  • -m max_ttl Option: Set the max number of hops for the packet to reach the destination.Default value is 30.


    $traceroute  -m 5

  • -n Option: Do not resolve IP addresses to their domain names.


    $traceroute -n

  • -p port Option: Set the destination port to use. Default is 33434.


    $traceroute  -p 20292

  • -q nqueries Option: Set the number of probes per each hop. Default is 3.


    $traceroute -q 1

  • packetlen Option: The full packet length. Default len is 60 byte packets.


    $traceroute 100

  • –help: Display help messages and exit.


    $traceroute --help

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!