If you have not installed the traceroute, it will report an error upon execution. So, you must have to install it before applying the command: to install traceroute; execute the following command:
The syntax of the traceroute command is mentioned below:
Once it is installed, you can use it in Ubuntu; before getting into details; let’s look at the basic use of traceroute:
You can use the following command to get the complete usage of traceroute:
Moreover, the following command will show the tracerouting for youtube.com
Or
There are few important notions that we can get from the output; there are few values on the first line of the output that is described below in bullets:
These all values can be set according to your requirement:
The traceroute command supports a list of options that can be inserted for various purposes; have a look at them:
You can set the number of Probes that are being passed: by default, 16 probes are passed simultaneously; you can adjust them using the “-N” option: the command given below will set the number to 10:
By default, there are 30 Hops; but you can set your own value by using the “-m” option: for instance, the command below will check the website for only 4Hops to reach the destination. You can observe the tracerouting is executed only until 4Hops.
You can set a number of probes using the “-q” flag with traceroute, by default, three probes are displayed at every Hop: this option can be adopted when you want quick responses:
The command below will limit the number of probes to 2:
With the help of the “-w” option, you can increase the number of seconds that each Hop must wait to show the result. It gets only float values, so you have to pass a floating number (6.0, 6.5); and it is foreseen that increasing the number of Hop times will show a better response: the command given below will set the wait time of 5.5ms for each Hop:
You can adjust the size of packets being sent per Hop; the default size is 60byte; the following command will resize packets to 50bytes.
The “-f” option of the traceroute command will print the result from the Hop number that you specify; you can choose the number of Hops from where the result will be displayed: for instance, the example shown below will start printing the result from the 10th Hop.
You can set pause time between probes; the default time is 0ms, but you can change it using the (-z) traceroute switch; the command given below will print Hops one by one with the time gap of 1ms:
Various network diagnostics tools are available such as traceroute and ping in Ubuntu. In networking, it is the duty of network admins to take care of the network; traceroute is one of the key tools for system or network admins. This guide provides a brief explanation of the traceroute command; with the help of the traceroute command, one can determine the delays in responses of network paths and look for routing loops (if present) in the network.
The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…
Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…
Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…
Focal Fossa will reach the End of Standard Support in May 2025, also known as…
Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…
Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…