traceroute: command not found

The traceroute command is used to report the network path between the source and destination computers, including any routers the connection uses. The process of a packet traveling from one router to the next is called a hop. The traceroute command therefore outputs each hop along the path. This is particularly effective when troubleshooting Internet connectivity or connections within very large routed environments. If the traceroute fails, being able to identify where along the path it failed is useful for troubleshooting.

Syntax

The syntax of the traceroute command is:

# traceroute [options] {destination}

Many routing issues are the result of misconfigured routing tables. These issues can usually be fixed by updating the routing tables. However, you must first identify what is causing the issue. Commands like traceroute and tracepath can reveal routing issues like routing loops, in which traffic is continuously routed back and forth between multiple nodes and never reaches its destination. For example, node A uses node B as a path to node C; but node B uses node A as a path to C. If traffic is bound for node C, nodes A and B will endlessly send the traffic between them because they both think each other is the path to C.

If you encounter the below error while running the traceroute command:

traceroute: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install traceroute
Ubuntu apt-get install traceroute
Arch Linux pacman -S traceroute
Kali Linux apt-get install traceroute
CentOS yum install traceroute
Fedora dnf install traceroute
Raspbian apt-get install trace-route

traceroute Command Examples

1. Traceroute to a host:

# traceroute host

2. Disable IP address and host name mapping:

# traceroute -n host

3. Specify wait time for response:

# traceroute -w 0.5 host

4. Specify number of queries per hop:

# traceroute -q 5 host

5. Specify size in bytes of probing packet:

# traceroute host 42
Related Post