🌐 How to Use the traceroute Command in Linux (Step-by-Step)

🌐 How to Use the traceroute Command in Linux (Step-by-Step)
Operating System(s)

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

 

ColumnMeaning
1,2,3Hop number
IPRouter address
msResponse 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

ProblemCause
* * * hopsFirewall blocking requests
Stops earlyNetwork restriction
High latencyCongested or distant route

💻 Windows Equivalent

On Windows, use:

tracert google.com

🚀 Pro Tips

  • Combine with ping for deeper diagnostics
  • Use -I if results look blocked
  • Compare routes from different networks
  • Don’t panic at a few * hops—this is normal

👍 Quick Summary

  • traceroute shows the path data takes
  • Helps diagnose network problems
  • Displays hops + response times
  • Use tracert on 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.

Force Cache (Faster Mirror)

Linux Commands

Files

tar · pv · cat · tac · chmod · grep ·  diff · sed · ar · man · pushd · popd · fsck · testdisk · seq · fd · pandoc · cd · $PATH · awk · join · jq · fold · uniq · journalctl · tail · stat · ls · fstab · echo · less · chgrp · chown · rev · look · strings · type · rename · zip · unzip · mount · umount · install · fdisk · mkfs · rm · rmdir · rsync · df · gpg · vi · nano · mkdir · du · ln · patch · convert · rclone · shred · srm · scp · gzip · chattr · cut · find · umask · wc · tr · hash  · compgen

Processes

alias · screen · top · nice · renice · progress · strace · systemd · tmux · chsh · history · at · batch · free · which · dmesg · chfn · usermod · ps · chroot · xargs · tty · pinky · lsof · vmstat · timeout · wall · yes · kill · sleep · sudo · su · time · groupadd · usermod · groups · lshw · shutdown · reboot · halt · poweroff · passwd · lscpu · crontab · date · bg · fg · pidof · nohup · pmap

Networking

netstat · ping · traceroute · ip · ss · whois · fail2ban · bmon · dig · finger · nmap · ftp · curl · wget · who · whoami ·· iptables · ssh-keygen · ufw · arping · firewalld