The traceroute
command is a network diagnostic tool used to track the path that packets take from your computer to a specified destination on the internet. It provides information about each hop along the route, including the time taken for each segment, which can help identify network issues.
The basic syntax of the traceroute
command is as follows:
traceroute [options] [destination]
-m <max_ttl>
: Set the maximum time-to-live (TTL) for packets. This limits the number of hops.-q <nqueries>
: Specify the number of probe packets sent per hop (default is 3).-w <waittime>
: Set the time to wait for a response from each probe (in seconds).-I
: Use ICMP ECHO instead of UDP datagrams.-T
: Use TCP SYN packets instead of UDP.Here are some practical examples of using the traceroute
command:
traceroute example.com
traceroute -m 10 example.com
traceroute -I example.com
traceroute -q 5 example.com
traceroute -w 2 example.com
sudo
if you encounter permission issues, as some options may require elevated privileges.