Fixed β€œtraceroute: command not found” in Linux

Linux TLDR
Last Updated:
Reading time: 2 minutes

Traceroute is a widely used network management command-line utility for Linux and macOS. It counts the number of hops required for the source to reach the destination, as well as the duration of each hop.

It’s pretty useful when you need to troubleshoot the route through which a network packet has to travel or diagnose broken routes that may prevent the packets from reaching other DNS servers.

Unfortunately, some Linux distributions removed it and no longer provide it by default, requiring manual installation.

traceroute command not found

So, if you’ve encountered the β€œtraceroute: command not found” error on your Linux distribution, don’t worry. To install it, simply open your Linux terminal and execute one of the provided commands, depending on your Linux distribution.

# On Debian, Ubuntu, Mint, Pop!_OS, etc.
$ sudo apt install traceroute

# On Redhat, Fedora, AlmaLinux, etc.
$ sudo dnf install traceroute

# On Arch, Manjaro, EndeavourOS, etc.
$ sudo pacman -S traceroute

Alternatively, if you want to install it from the source, you can download the latest traceroute tarball file from SourceForge, and once downloaded, execute the following commands to compile and install it on your Linux system.

# Extract the content of tarball file.
$ tar -xzf traceroute-*.tar.gz

# Move into the extracted directory.
$ cd traceroute-*/

# Compile the package.
$ make

# Install the traceroute.
$ sudo make install

Once the installation is complete, the β€œtraceroute” command will become accessible, allowing you to start tracing different sites and servers to find their routes.

$ traceroute


find route of site using traceroute

Instead of using it plain, you can choose other options such as the β€œ-w” option to specify the amount of time in seconds to wait for a response (default is 10), the β€œ-q” option to set the number of probes on each hop (default is 3), and the β€œ-m” option to set the maximum number of hops (default is 30).

If you want to dig further into the different available options, then you can run the β€œtraceroute --help” command to check its help section.

Here, I’ll end this article, but if you have any questions or queries related to the topic, then do let me know in the comment section.

Till then, peace!

Join The Conversation

Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.