๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐ŸŒ Networking August 30, 2026 2

Linux Command: mtr

Combine ping and traceroute in a single network diagnostic tool

Terminal โ€” Networking
Command
$ mtr example.com

mtr (My Traceroute) combines the functionality of traceroute and ping into a single real-time diagnostic tool. It continuously probes each hop in the network path, showing packet loss and latency statistics. mtr is far superior to traceroute for diagnosing network issues because it provides ongoing statistics rather than a single snapshot. It shows packet loss percentage, average/best/worst latency, and standard deviation for each hop. mtr is the tool network engineers reach for first when diagnosing connectivity issues. It quickly reveals where packet loss or latency spikes occur in the network path.

Syntax

mtr [OPTION]... HOST

Key Options

  • -r โ€” Report mode (text output, then exit)
  • -c โ€” Number of pings per hop
  • -n โ€” No DNS resolution
  • -w โ€” Wide report (show IPs and hostnames)
  • -T โ€” Use TCP instead of ICMP
  • -4/-6 โ€” Force IPv4 or IPv6

Examples

Interactive trace

mtr example.com

Report mode

mtr -r -c 100 example.com

Output: HOST Loss% Snt Avg Best Wrst 1. gateway 0.0% 100 1.2 0.8 3.4 2. isp-router 0.5% 100 5.6 4.2 12.1

Wide report

mtr -rw -c 50 8.8.8.8

Pro Tips

  • Loss at one hop but not the next is usually harmless (router deprioritizes ICMP). Loss that persists to the destination is real.
  • mtr -rw -c 100 host gives a comprehensive report. Paste this when reporting network issues to your ISP or hosting provider.
  • ICMP mode (default) often needs root. TCP mode (-T) always needs root. Use sudo mtr.

Learn more: Full mtr reference โ†’

Share this tip