WebMasterCampus
WEB DEVELOPER Resources

Linux traceroute Command

Learn Linux traceroute Command with examples


Linux traceroute Command

In Linux, we can use “traceroute” command 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.

traceroute Command Syntax

>> traceroute [options]  host_Address [pathlength]

traceroute Command Example

>> traceroute google.com

traceroute IPv4 Command

Use ip version 4 i.e. use IPv6

>> traceroute -4 10 google.com

traceroute IPv6 Command

Use ip version 6 i.e. use IPv6

>> traceroute -6 10 google.com

traceroute -F Command

traceroute -F do not fragment packet.

>> traceroute -F google.com

traceroute -f first_ttl Command

traceroute -f first_ttl start from the first_ttl hop (instead from 1).

>> traceroute -f 10 google.com

traceroute -g Command

traceroute -g 192.168.43.45 google.com

>> traceroute -f 10 google.com

traceroute -m Command

traceroute -m set the max number of hops for the packet to reach the destination.Default value is 30.

>> traceroute  -m 5 google.com

traceroute -n Command

traceroute -n do not resolve IP addresses to their domain names.

>> traceroute -n google.com

traceroute -p Command

traceroute -p set the destination port to use. Default is 33434.

>> traceroute  -p 20292 google.com

traceroute -q Command

traceroute -q nqueries Option to set the number of probes per each hop. Default is 3.

>> traceroute -q 1 google.com

traceroute packetlen Command

traceroute packetlen Option to full packet length. Default len is 60 byte packets.

>> traceroute  google.com 100

traceroute ––help Command

–help: Display help messages and exit.

>> traceroute --help
Created with love and passion.