Ubuntu: Determine ping - how it works
With the ping command on Ubuntu, you can determine which servers and computers can be reached in the network. In this article, we will show you how to determine ping.
How to determine your ping in Ubuntu
When installing Ubuntu, you automatically load an integrated ping program.
- There are two variants of ping commands under Ubuntu: "ping" for Ipv4 addresses and "ping6" - for Ipv6 addresses.
- The options for the command are the same for both variants. In the following examples you can also replace "ping" with "ping6".
- Enter the ping command in Ubuntu in the terminal to send a request to a server or a computer. The command is "ping option IP address", where you replace "option" with the desired option and enter the IP address.
- You can also enter the host name instead of the IP address. Then the command is "ping OPTION chip.de", for example, if you want to ping CHIP.de. Replace “option” here with the desired option.
Ping command: The options
You can choose different options when entering the ping command.
- Limit number: If you want to limit the number of ping attempts, you can do this with the option "-c" and then the number of attempts. Example: "ping -c 3 chip.de".
- End: With the option "-w" and a number after it you can set a time after which the ping is ended. It does not matter how many inquiries were answered during this time. Example: "ping -w 15 chip.de".
- Timeout: The "-W" option specifies that ping only waits for a response for the specified time. If the request is not answered during this time, ping is ended. Example: "ping -W 5 chip.de".
- Interval: Without this option, Ping sends requests every second. You can set this interval yourself with the "-i" option. Example: "ping -i 5 chip.de".
- Interface: You can also use the "-I" option to determine the interface via which the requests are sent.
We will explain to you in our next practical tip what can happen if Ubuntu hangs up.