Close this search box.

How to Install Trace Route In Linux

Table of Contents

Trace Route Installation Guide


One of the essential tools at a Linux administrator’s disposal when troubleshooting network issues is the traceroute. This tool lets you see the path that network packets take from your computer to a remote host. It can provide invaluable information when trying to diagnose connectivity problems.


In this article, we will look closer at the traceroute command in Linux, exploring how it works, what it can tell you about your network, and how to troubleshoot connectivity issues. We will also cover some advanced use cases for trace routes and some common pitfalls to avoid.

We will start with a discussion of what is traceroute,


What is Trace Route?

Trace Route is a command-line tool that traces network packets’ path from your computer to a remote host. It does this by sending a series of packets to the remote host, with each packet increasing the time-to-live (TTL) value by one. The TTL value is a field in the IP header of each packet that specifies how many hops the packet can make before being discarded.


When a packet reaches a router on its way to the remote host, it decrements the TTL value by one. If the TTL value reaches zero before the packet reaches its destination, the router discards it and returns an ICMP “time exceeded” message to the sender.


By sending packets with increasing TTL values, the traceroute can build a map of the network path between your computer and the remote host. Each router that the packets pass through will send an ICMP “time exceeded” message back to the sender, along with information about the router itself. Trace route uses this information to display each router’s IP address and hostname in the path and the round-trip time (RTT) for each packet.



Here are the following instructions for installing traceroute on the following servers,

  • Fedora
  • Debian
  • Ubuntu
  • CentOS
Installing Traceroute
  • CentOS/Fedora


Connect to your server over SSH or KV.M. 



And run the following command: 


yum -y install traceroute

Currently, you have introduced Trace Route (traceroute) on your server. If you receive an error message that says traceroute is not available, run the following command:



yum update


  • Debian/Ubuntu


Connect to your server over SSH or KVM 


Run the following command:


apt-get -y install traceroute


You now have Trace Route (traceroute) introduced on your server. If you get a message that says it can’t find the traceroute, Please run the following command:


apt-get update


In writing this article, we aim to give you an overview of installing traceroute in different Linux flavors. We hope this article has given you a better understanding.


Using Trace Route

Using a traceroute is relatively simple. The traceroute is included as part of the default installation on most Linux distributions, so you should be able to use it right out of the box.


To use the traceroute, open a terminal window and type “traceroute,” followed by the IP address or hostname of the remote host you want to trace. For example:



This will send a series of packets to with increasing TTL values. As each package passes through a router on its way to, the traceroute will display information about the router, including its IP address, hostname, and RTT.


By default, the traceroute sends three packets to each router, waiting up to five seconds for a response before moving on to the next hop. You can customize these settings using various command-line options. For example, to increase the number of packets sent to each router to ten,


you can use the “-q” option:


traceroute -q 10


Similarly, you can adjust the timeout value using the “-w” option:

Traceroute -w t 10


Advanced Use Cases

While the traceroute is primarily used for troubleshooting connectivity issues, it can also be used for other purposes. For example, you can use the traceroute to:

  1. Identify routing loops: If you notice that the same router appears multiple times in the traceroute output, this could indicate a routing loop. In this situation, packets are sent in circles between two or more routers rather than progressing toward their destination.
  2. Identify asymmetrical routing: Asymmetrical routing occurs when packets are sent through different paths in different directions. This can cause issues with firewalls and load balancers and can be challenging to diagnose without traceroute.
  3. Identify network congestion: If you see high RTT values or packet loss at a particular router, this could indicate network congestion. This could be caused by heavy traffic on the network or a sign of a more severe issue, such as a malfunctioning router.
  4. Identify network topology: By examining the traceroute output, you can understand the network topology between your computer and the remote host. This can be useful for network mapping and planning.
  5. Troubleshoot DNS issues: If you enter a hostname rather than an IP address in the traceroute command, the traceroute will perform a DNS lookup to resolve the hostname to an IP address. If there are issues with DNS resolution, this can be a helpful way to identify them.

Common Pitfalls Trace Route

While the traceroute is a powerful tool for diagnosing network issues, some common pitfalls exist. Here are a few to keep in mind:

  1. Firewalls: Many firewalls block ICMP traffic, which the traceroute uses to receive “time exceeded” messages from routers. If you’re behind a firewall, you may not be able to use traceroute, or you may need to configure your firewall to allow ICMP traffic.
  2. NAT: If you’re behind a network address translation (NAT) device, you may be unable to trace the entire path to the remote host. This is because the NAT device may change the source IP address of the packets, making it difficult to track the direction of the packages.
  3. Load balancers: Load balancers can also interfere with trace routes, as they may send packets through different paths depending on their load balancing algorithm. This can make it challenging to diagnose connectivity issues.

Conclusion Trace Route

Trace Route is a powerful tool for diagnosing network issues and should be a staple of every Linux administrator’s toolkit. Tracing the path network packets take from your computer to a remote host can identify routing issues, network congestion, and other connectivity problems.

While the traceroute is relatively simple, some common pitfalls include firewalls, NAT devices, and load balancers. By keeping these in mind, you can use the traceroute more effectively and get better results when troubleshooting network issues.



Trace Route is a command-line tool in Linux that allows you to trace the path that network packets take from your computer to a remote host. It helps identify connectivity issues by showing each router’s IP address and response times.

To use Trace Route in Linux, open a terminal casement and type “traceroute,” followed by the IP directions or domain name of the remote host you want to trace. For example, “traceroute” This will generate a list of routers along the path, along with their IP addresses and response times.

Trace Route can diagnose various network issues, such as routing issues, network congestion, and connectivity problems. It can also be used to identify network topology and troubleshoot DNS issues.

Yes, Trace Route is also available on Windows and Mac. However, the syntax may be slightly different depending on the operating system. On Windows, the command is “tracert,” while on Mac, it’s “traceroute.”

Common pitfalls when using Trace Route include firewalls, network address translation (NAT) devices, and load balancers. These can interfere with Trace Route by blocking ICMP traffic or changing the source IP address of the packets.

Make a Comment
Share on
VPSie Cloud service

Fast and Secure Cloud VPS Service

For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.