Linux Terminal Command: traceroute
The traceroute command is an essential tool in Network Utilities. In this tutorial, we will explore what traceroute does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.
Concept & Explanation
The traceroute command displays the path packets take to reach a destination host, listing the IP addresses of intermediate routers.
Common Options & Syntax
traceroute [options] [arguments]
Here are the most common flags used with traceroute:
- Simple Usage: Basic default commands.
- Detailed View: Shows diagnostic information.
- Advanced Actions: Can chain parameters for scripting.
1. Interactive Example (Simple)
Here is how most people run the command:
# Example
traceroute google.com
What it does: Traces the packet path to ‘google.com’.
2. Power-User Example (Advanced)
For scripting and advanced diagnostics, use this configuration:
# Advanced
traceroute -I -q 1 google.com
What it does: Traces paths using ICMP requests (-I) rather than UDP, sending exactly 1 query packet per hop to speed up results.
⚙️ Warning & Common Pitfalls
[!WARNING] Many intermediate routers block traceroute packets. You may see rows of asterisks (
* * *) representing silent hops.
🔗 Related Commands
Here are some related posts on cli_tty1 you might want to check out:
- host : Simple DNS lookup utility.