How to Install Traceroute on Linux (Ubuntu, CentOS, RHEL, Fedora)

Traceroute is a network diagnostic tool used to trace the route that packets take from your computer to a target destination (e.g., a website or another server). It can help identify network issues, such as slow connections or unreachable destinations, by displaying the latency and the number of hops between your system and the target.

In this short guide, we will show you how to install and use traceroute on different Linux distributions. By following these steps, you will be able to troubleshoot network problems and analyze the route taken by packets in your network.

Install Traceroute on Debian-based Systems (e.g., Ubuntu)

For Debian-based systems, such as Ubuntu and Debian, you can install traceroute using the apt package manager. First, open a terminal and update the package list by running:

sudo apt update

Next, install the traceroute package with the following command:

sudo apt install traceroute

Install Traceroute on Red Hat-based Systems (e.g., CentOS, RHEL, Fedora)

For Red Hat-based systems, such as CentOS, RHEL, and Fedora, you can install traceroute using either the yum or dnf package manager, depending on your distribution.

See also  How to Configure FTP Server in Linux RHEL 6

For CentOS and RHEL, open a terminal and run:

sudo yum install traceroute

For Fedora, run:

sudo dnf install traceroute

Use Traceroute

After installing traceroute, you can use it to trace the route that packets take to a target destination. Run the following command in the terminal, replacing “webhostingeeks.com.com” with the target destination (e.g., a domain name or an IP address):

traceroute webhostingeeks.com

Traceroute will display the route taken by packets, including each hop and its latency. Analyze the output to identify any network issues, such as high latency or unreachable destinations.

See also  How to Install Postfix on Ubuntu

Commands and Their Functions:

  • sudo apt update – Updates the package list on Debian-based systems.
  • sudo apt install traceroute – Installs the traceroute package on Debian-based systems.
  • sudo yum install traceroute – Installs the traceroute package on CentOS and RHEL.
  • sudo dnf install traceroute – Installs the traceroute package on Fedora.
  • traceroute example.com – Traces the route that packets take to a target destination.

Conclusion

In this guide, we have demonstrated how to install and use traceroute on different Linux distributions, including Debian-based systems (e.g., Ubuntu) and Red Hat-based systems (e.g., CentOS, RHEL, Fedora). With traceroute installed on your Linux system, you can now troubleshoot network problems, identify slow connections or unreachable destinations, and analyze the route taken by packets in your network.

See also  How to Configure System Accounting with auditd on Linux CentOS 6.3

Please feel free to leave comments and suggest improvements to this guide. Your feedback is valuable and helps us improve our content for our audience.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *