The traceroute command in Linux shows the path your data takes across the internet to reach a destination. It’s a powerful tool for diagnosing slow connections, routing issues, and network failures.
🔎 What is traceroute?
traceroute maps the network hops between your computer and a target (like a website or server).
👉 Each “hop” = a router along the path
👉 It also shows latency (response time) at each step
✅ Basic Syntax
traceroute domain.com
🌍 Example: Trace a Website
traceroute google.com
👉 Output shows:
- Hop number
- Router hostname/IP
- Response times (ms)
📊 Example Output Explained
1 192.168.1.1 1.123 ms 0.987 ms 1.045 ms
2 10.10.0.1 5.456 ms 5.321 ms 5.400 ms
3 * * *
4 142.250.x.x 20.123 ms 19.876 ms 20.001 ms
| Column | Meaning |
|---|---|
| 1,2,3 | Hop number |
| IP | Router address |
| ms | Response time |
* | No response (timeout or blocked) |
⚙️ Common Options
🔢 Limit Number of Hops
traceroute -m 10 google.com
⏱ Set Timeout
traceroute -w 2 google.com
📦 Use ICMP Instead of UDP
traceroute -I google.com
👉 Useful when networks block default traceroute packets
🔁 Send Fewer Probes
traceroute -q 1 google.com
🧪 Real-World Uses
- Diagnose slow internet connections
- Identify where a connection fails
- Troubleshoot server routing issues
- Check ISP routing paths
⚠️ Common Issues
| Problem | Cause |
|---|---|
* * * hops | Firewall blocking requests |
| Stops early | Network restriction |
| High latency | Congested or distant route |
💻 Windows Equivalent
On Windows, use:
tracert google.com
🚀 Pro Tips
- Combine with
pingfor deeper diagnostics - Use
-Iif results look blocked - Compare routes from different networks
- Don’t panic at a few
*hops—this is normal
👍 Quick Summary
tracerouteshows the path data takes- Helps diagnose network problems
- Displays hops + response times
- Use
tracerton Windows
🎯 Final Thoughts
traceroute is one of the most useful networking tools in Linux. Whether you’re debugging a slow website or checking connectivity issues, it gives you a clear view of what’s happening between you and your destination.