tracert is a command in MS-DOS command prompt to trace the route to an IP Address. Is there any command in the Gnome Terminal equivalent to this?

  • 3
    Just an aside: if you're referring to the command-line utility in Windows, it is just that, a Windows command-line application, not a MS-DOS application. MS-DOS has been out of favor for some 17 years (since the release of Windows 95) and certainly for a decade (since Windows XP came out, giving the NT kernel a huge boost in the home market). – a CVn Sep 18 '12 at 9:39
  • hehe.. sorry. I generally use cmd, but for posting here i used that. btw thanks for the info :D – vipin8169 Sep 18 '12 at 9:52

Install the traceroute package via terminal by running:

sudo apt-get install traceroute

After that, type this in the terminal:

traceroute [ip/web-site domain]

For example:


you can also use web-sites as well:

traceroute www.sitename.com
| improve this answer | |
  • 7
    Have a look at tracepath, too. – imz -- Ivan Zakharyaschev Sep 17 '12 at 12:10
  • "This works. However, there is now (at least with Ubuntu 16.04) an ambiguity when trying to use traceroute when it is not installed (package inetutils-traceroute is also suggested): "The program 'traceroute' can be found in the following packages: inetutils-traceroute traceroute. Try: sudo apt install <selected package>". Which package is preferred? Perhaps you can update your answer? – Peter Mortensen Jul 22 '16 at 23:00
  • User Alen T is missing in action. Perhaps somebody else can update this answer? – Peter Mortensen Jul 22 '16 at 23:02
  • 2
    An answer from 2014 suggests inetutils-traceroute is the preferred package, not traceroute. – Peter Mortensen Jul 22 '16 at 23:08

As an alternative to traceroute, you might use mtr, it's like traceroute on steroids.

From the package description:

mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool.

As mtr starts, it investigates the network connection between the host mtr runs on and a user-specified destination host. After it determines the address of each network hop between the machines, it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine. As it does this, it prints running statistics about each machine.

mtr-tiny is compiled without support for X and conserves disk space.

To install it:

sudo apt-get install mtr-tiny

Usage example:

mtr example.lan

Example output:

                             My traceroute  [v0.71]
            example.lan                           Sun Mar 25 00:07:50 2007

                                       Packets                Pings
Hostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. example.lan                        0%   11   11     1    1    1      2
 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14
 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14
 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31
 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30
 6. ge-3-0-0-53.gar1.Washington1.Le    0%   11   11    18   18   20     36
 7.                      0%   10   10    19   19   19     19
 8. t-3-1.bas1.re2.yahoo.com           0%   10   10    19   18   32    106
 9. p25.www.re2.yahoo.com              0%   10   10    19   18   19     19
| improve this answer | |

traceroute, traceroute6, tracepath perform this task. They are executable programs installed in Unix systems (somewhere in /usr/bin/, or /bin/, or /usr/sbin/, or /sbin/ -- the last two are not in the PATH for a normal user, only for root). They are independent of any terminal package.

| improve this answer | |
  • do i need to install anything to use it? – vipin8169 Sep 17 '12 at 12:00
  • 1
    @vipin8169 I'm not sure whether it is installed by default in Ubuntu. Will have to check the name of the package which it belongs to. Perhaps someone else can help and edit the answer? I'm not currently working on an Ubuntu system. – imz -- Ivan Zakharyaschev Sep 17 '12 at 12:09
  • actually i installed traceroute package before trying tracepath, it worked.. but i don't know if it was related to that install or not – vipin8169 Sep 17 '12 at 12:24

I believe this has changed. You no longer type the traceroute command line with the "ip/website url" configuration. Instead you will need to type:

traceroute <websiteinquestion.com (org, net, gov, whatever)>

I don't know why this has been simplified but after attempting to find a solution as to why Hulu.com was freezing up on me it was suggested to try a traceroute command. On a hunch I tried it with just the domain name and extension and it worked perfectly.

| improve this answer | |
  • I think this answer is incorrect. Nothing has changed. traceroute has never worked with a URL (e.g. traceroute http://askubuntu.com/). It has always worked with a domain name (e.g. traceroute askubuntu.com). – Peter Mortensen Jul 22 '16 at 23:59

So, tracepath is most suitable option to your question if taking in account that you used as a reference a native software (tracert).

Something that worth to mention is that tracepath is in the standard installation package of Ubuntu. Hence, if you are a Ubuntu lover, you may consider learning it instead of traceroute or mtr.

mtr, in the other hand is widely used by collocation providers because additional features that may be very useful while tracking problems, while traceroute has a very suggestive name that is easy to remember.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.