mtr (My Traceroute) is an interactive network diagnostic tool that merges the capabilities of ping and traceroute. It monitors the path to a given host and provides live statistics on response times and packet loss for each hop.
Use your package manager based on the distribution:
sudo apt install mtr # Ubuntu / Debian
sudo yum install mtr # CentOS / RHEL
sudo pacman -S mtr # Arch LinuxTo trace a host interactively:
mtr google.com
To use ICMP echo (like ping):
mtr -e google.com
Host Loss% Snt Last Avg Best Wrst StDev
192.168.1.1 0% 10 1.1 1.2 1.1 1.3 0.1
10.0.0.1 0% 10 3.4 3.3 3.1 3.5 0.2
...
| Option | Description | Example |
|---|---|---|
| -n | Don't resolve hostnames | |
| -r | Run in report mode | |
| -c NUM | Number of ping cycles | |
| -e | Use ICMP echo packets | |
| -b | Show both hostnames and IPs | |
| -o | Customize displayed columns | |
Store results in a text file for analysis:
mtr -r -c 15 google.com > mtr_report.txt| Feature | ping | traceroute | mtr |
|---|---|---|---|
| Path discovery | ❌ | ✅ | ✅ |
| Interactive display | ❌ | ❌ | ✅ |
| Packet loss analysis | ✅ | ❌ | ✅ |
| Protocols | ICMP | UDP / ICMP | UDP / ICMP |