FactorPad
Build a Better Process

Linux traceroute Command Summary with Examples

Linux traceroute allows you to show the route to hosts.
  1. Purpose - Learn what traceroute is for and how to find help.
  2. Options - Review a few common options and arguments.
  3. Examples - Walk through code examples with traceroute.
  4. A tip - Finish off with one more insight.
face pic by Paul Alan Davis, CFA
Updated: February 24, 2021
In this tutorial on Linux traceroute, 83 of 100, below find a 3-4 minute introductory video, a text-based tutorial and all of the code examples from the video.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / traceroute-command.html


An ad-free and cookie-free website.


Examples of the Linux traceroute Command

Beginner

Learn about the route across Internet hosts at the Linux command line.

Video Tutorial

Videos can also be accessed from the Linux Essentials Playlist on YouTube.

Linux traceroute Command Summary with Examples (3:15)

Video Script

The Command and Why You Need It

Our eighty-third word, or command to memorize is traceroute from our category Communication.

traceroute allows you to show the route to hosts.

Common Linux traceroute Options
-options description
--help Print help screen
-i, --icmp Use the ICMP ECHO method

Recall from ping in the last video (tutorial) we sent data packets to hosts? Now we'll trace the route those packets take across thousands of miles.

Before we start, it helps to think of commands as mini programs and most follow this structure: command -option(s) argument(s).

The traceroute command has 34 options, and the argument is normally the host and hosts can be translated to host names, like google.com, or given in numbers like the Internet Protocol (IP address).

Like most commands, help is available with double-dash --help and we'll use the -I ICMP ECHO method, just like with ping rather than the default.

So why is traceroute an important command? Well, to be honest, for us the point is just to grasp the concept of how packets are delivered over the Internet. And now you know how to do that.

Demonstration

Okay, the best way to embed this in your memory is by typing in your own terminal window.

Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.

Here we go. So we said that data packets traverse many hosts or computers, or routers and some identify themselves and others don't. I'll do a traceroute using the -I method to the extraordinarily useful website factorpad.com. ;)

$ sudo traceroute -I factorpad.com traceroute to factorpad.com (69.195.124.226), 30 hops max, 60 byte packets 1 0.033 ms 0.006 ms 0.004 ms 2 209.85.246.228 (209.85.246.228) 36.489 ms 36.551 ms 36.656 ms 3 64.233.174.40 (64.233.174.40) 26.158 ms 26.168 ms 36.164 ms 4 ace-data-centers.as11798.any2ix.coresite.com (206.72.210.128) 36.096 ms 36.097 ms 36.127 ms 5 tg5-3.ar04.prov.acedc.net (199.58.196.105) 53.678 ms 53.677 ms 53.676 ms 6 prv-211-1-0-1.unifiedlayer.com (69.27.175.137) 53.606 ms 53.238 ms 53.206 ms 7 69-195-64-130.unifiedlayer.com (69.195.64.130) 53.367 ms 53.492 ms 53.483 ms 8 162-144-240-159.unifiedlayer.com (162.144.240.159) 53.254 ms 53.245 ms 53.231 ms 9 162-144-240-15.unifiedlayer.com (162.144.240.15) 53.401 ms 53.594 ms 53.509 ms 10 box1026.bluehost.com (69.195.124.226) 54.050 ms 54.030 ms 53.640 ms

This should give you an indication of what's going on every time you use your smartphone, tablet or computer, packets moving around between all of these routers.

And last, let's look at the ouput. The first column is the number of hops. Next, some routers identify themselves with names, others with IP addresses, and speed metrics of course. So, other than the concept, for us know now the rest is not very meaningful.

A Final Tip

Okay now you know how to use traceroute. And you know the syntax for commands, options and arguments.

One last tip about the traceroute command. So in coming videos look for us to dive into commands that actually share names with Protocols. Ooh, suspense.

Okay, thanks for visiting today. I hope this was a helpful introduction to the traceroute command.


Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:


What's Next?

I'd love to for you to be a part of something unique when there's so much opportunity for people with advanced technical skills. Subscribe, follow, join and contribute.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / traceroute-command.html


linux traceroute command
linux traceroute examples
traceroute linux
traceroute command
linux traceroute
traceroute command linux
traceroute tool
route trace
see path across internet
traceroute example
how traceroute works
route to hosts

A newly-updated free resource. Connect and refer a friend today.