Linux Traceroute: Commands & Examples Guide
Run traceroute on Linux to map every hop to a website, install it on Debian, Fedora or Arch, and read the times to find where a connection slows down.
Your video keeps buffering, your game lags, and your internet feels slow — but your Wi-Fi signal looks fine. I have been there, and the problem is rarely your router. It sits somewhere along the path your data takes across the internet, and Linux traceroute shows you exactly where it hides.
This guide explains what traceroute is, how it works on Linux, how to install it, and how to read the results.
On Linux, run traceroute example.com to map every hop your data takes to a website. Hop 1 is your own router — log in at 192.168.1.1 if the delay starts there — and each line after it is one more router on the path.
What is traceroute and how does it work?
Traceroute is a command-line tool that shows the route your data takes from your computer to a website or server. It lists each router along the way, called a hop, with the time that hop took to answer.
I use it when a site is slow or will not load, because it tells me where the delay starts. Ping only tells me something is wrong; traceroute tells me where.

The command has been around since the late 1980s, when Van Jacobson wrote it. It works by sending small packets toward the destination with a rising Time-To-Live value, and each router that drops one sends a message back.
Each reply becomes one line in the output, with three times — one for each probe packet sent. A slow hop stands out at once, and a silent hop shows up as asterisks.
Why should you care?
I reach for traceroute in three situations, and each one is about finding where a problem lives rather than guessing.
- Slow website loading: the trace shows whether the slowdown is at your end, your ISP, or the website server.
- Diagnosing connectivity issues: if a site will not load at all, the trace shows where the path breaks.
- Learning about networks: the trace shows the real route your data takes, hop by hop, in real time.
Think of it as a GPS for troubleshooting. It will not fix the fault, but it points at the exact stretch of road where the fault sits.
How to install traceroute on Linux
Linux works like macOS, but some distributions need you to install the tool first. The install takes one command, and then it works the same way.
- Open Terminal. On Debian or Ubuntu, install it with sudo apt install traceroute.
- On Fedora, install it with sudo dnf install traceroute. On Arch, use sudo pacman -S traceroute.
- Type traceroute google.com and press Enter to run your first trace.
- Wait for the trace to finish, then read the hops from top to bottom.
If the command is missing, the shell says so plainly, and the install above fixes it in under a minute. I install it once and it stays on the system for every future check.
Traceroute command syntax
The basic syntax is traceroute [options] destination, where the destination is a domain name or an IP address. I start with the plain command and add options only when the first run leaves a question open.
| Option | What it does | Example |
|---|---|---|
| -n | Show IP addresses, skip hostname lookups | traceroute -n google.com |
| -m | Set the maximum hops to try | traceroute -m 10 google.com |
| -q | Probes sent per hop (default 3) | traceroute -q 5 google.com |
| -w | Wait time for each reply | traceroute -w 3 google.com |
| -I | Use ICMP echo instead of UDP packets | traceroute -I google.com |
| -T | Use TCP probes to a port | traceroute -T -p 80 google.com |
| -p | Set the destination port for probes | traceroute -p 443 google.com |
| -f | Start at a TTL other than 1 | traceroute -f 5 google.com |
The -n flag is the one I reach for first, because it skips slow DNS lookups and the trace finishes faster. The -I flag is the one I reach for when a trace returns only asterisks, because many routers answer ICMP and ignore UDP.
Understanding TTL (Time to Live) values
TTL is a number in the header of every IP packet, and it sets the maximum hops a packet may take before it is dropped. Each router that forwards the packet lowers the TTL by one, and when it hits zero the router drops the packet and sends a message back.
That message is the whole trick. Traceroute sends a packet with a TTL of 1, learns hop 1, then sends one with a TTL of 2, and so on until the packet reaches the destination.
- Loop prevention: TTL stops packets from circling a network forever and clogging it up.
- Diagnostics: traceroute uses TTL to map each hop and spot slow routers or dead ends.
- Normal values: most systems start at 64, and a trace rarely needs more than 30 hops.
I keep the default limit of 30 hops for a first run. If the trace stops early with asterisks, that hop is not answering, not necessarily broken.
Example traceroute output
I read the output like a journey log. Each line is one stop, and the three times show how steady that stop is.
| Hop | Address | Times |
|---|---|---|
| 1 | 192.168.1.1 | 1 ms, 1 ms, 1 ms |
| 2 | 10.20.30.1 | 8 ms, 7 ms, 9 ms |
| 3 | 203.0.113.45 | 22 ms, 21 ms, 23 ms |
| 4 | 93.184.216.34 | 28 ms, 27 ms, 29 ms |
Hop 1 is your own router at 1 ms, which is normal. The times grow as the packets travel further, and a sudden jump at one hop is the clue you are looking for.
How to read traceroute results
I read the output in three passes: the times, the asterisks, and the place where things change. That order keeps me from blaming the wrong hop.

Hop number: the step-by-step order of the journey. Hop 1 is usually your local network gateway, the first stop your data makes.
Response times: measured in milliseconds, these show how long it takes for data to travel to each hop and back. A hop that jumps from 8 ms to 180 ms is the traffic jam.
Asterisks: a hop did not answer in time. One silent hop often means that router ignores traceroute, not that it is broken. Several in a row near the end usually means the same thing.
If the delay starts past hop 1, the problem is outside your home. Note the hop where the times jump, and give that line to your ISP — it tells them exactly where to look.
Common issues with traceroute
When a Linux trace goes wrong, the output tells you which of these it is. I check them in this order, because the first two cover most bad traces.
- Blocked ICMP messages: firewalls often block the packets traceroute uses, so the trace stops short and shows timeouts.
- Packet loss: if some packets never arrive, the network or a router on the path is overloaded.
- Port unreachable: when the destination port does not answer, the trace stops at the last hop that does.
- Long response times: high times point to congestion or a router that is struggling to keep up.
- Wrong domain names: bad DNS settings make the trace show the wrong names for hops, which muddies the map.
If you cannot reach your router at all, find your real gateway first with our Router IP Finder. A wrong gateway address looks like a dead network, but it is only a wrong number.
Best practices for using traceroute
A traceroute is only useful if you read it carefully. These habits keep the results honest.
- Use a domain name, not just an IP, so the hops carry names you can read.
- Watch the response times. A big jump at one hop points to the bottleneck.
- Watch for packet loss at one hop. Steady loss there means a real fault, not a blip.
- Run the trace at different times. Peak and off-peak runs show what is normal and what is a real fault.
- Pair it with ping. Ping checks if a device answers; traceroute shows the whole path to it.
Save the output for support with a redirect: traceroute example.com > traceroute-results.txt. A saved trace is worth more than a description when you report a fault. I save every trace I send to support, because a saved file settles arguments fast.
Limitations of the traceroute command
Traceroute is a sharp tool, but it has edges. I keep these in mind before I trust a trace completely.
- Blocked packets: a router that blocks ICMP or UDP leaves gaps in the route, and the map comes out incomplete.
- Misleading results: some routers do not lower TTL properly, so their times look wrong.
- One direction only: traffic often takes a different path back, and traceroute shows the way out, not the way home.
- Load balancing: traffic can split across paths, so two runs of the same trace can look different.
- High latency: a long route with many hops takes longer to finish and can time out.
When a trace looks odd, I run it again with -I to switch packet types, and I run it twice. A fault that shows up in both runs is real; a fault that moves was load balancing.
Security considerations when using traceroute
A trace prints your network’s shape: IP addresses, hostnames, and slow routers. I never post a full trace in public, because that map is useful to anyone who wants to probe the network.
Some firewalls treat traceroute as a probe and log it or block it, so I check the rules where I work before I run it. On a home network that is rarely an issue, but on an office network it is worth a quick ask.
Alternatives to traceroute for network analysis
Traceroute is the classic tool, but it is not the only one. I keep these in the same toolbox, and each one answers a slightly different question.
- MTR: combines traceroute and ping into a live view, and it keeps probing each hop so you can watch loss change over time.
- PingPlotter: draws the route as a graph, which suits anyone who reads pictures faster than text.
- Nmap: maps hosts and open ports, and it helps when the question is what is reachable, not just where it sits.
- PathPing: runs traceroute and ping together over time, which suits Windows users tracking a fault that comes and goes.
- Wireshark: captures the packets themselves, which is the tool for the deepest checks.
For the everyday job — a slow site, a dead site, a laggy game — traceroute is enough, and our general traceroute guide covers the same steps on Windows and Mac as well as Linux.
Traceroute vs ping
Ping and traceroute both send packets, but they answer different questions. I use ping for a quick yes or no, and traceroute when I need the where.
| Tool | What it tells you | When to use it |
|---|---|---|
| Ping | Whether a device answers, and how fast | Quick check if a site is up |
| Traceroute | Every hop on the path, with times | Find where a slowdown starts |
Ping returns one summary: the fastest response times to the target. Traceroute returns a step-by-step report of every node the data crossed, which is what you need to find a bottleneck.
Traceroute on Linux: what users ran into
Linux shows stars where Windows shows hops
Linux traceroute sends UDP packets by default while Windows tracert uses ICMP. Some routers answer one and not the other, so try traceroute -I to use ICMP.
Stars at one hop, then normal hops again
Many ISP core routers drop probes. A consistent * * * at one hop followed by normal replies is harmless filtering, not packet loss.
Paths look different each run
Load balancing can send probes down different paths and produce false stars. Paris traceroute keeps the flow the same and cuts these false gaps.










