What is the equivalent of the "tracert" DOS command?

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?


Solution 1:

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:

traceroute 8.8.8.8

you can also use web-sites as well:

traceroute www.sitename.com

Solution 2:

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. 63.210.29.230                      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