Ping Command And Usages

In this article, you will learn about ping command and usages.

Ping stands for Packet Internet or Inter-Network Groper. It is a command to check the connectivity between two machines. All the system admins know this command, and it is a part of their life.

Today, we are going to discuss the ping command and usages.

How To Check Ping Version Installed On Your Machine

If you want to check the ping version which is installed on your machine then you can use the below command.

ping -V

Also, you can see the output in the below picture.

ping command and usages
Checking installed ping version

How To Use Ping Command And Usages

The ping command uses ICMP (Internet Control Message Protocol) to send an ICMP echo message to the particular machine and if that machine (host) is available then it sends ICMP reply message.

If you want to check the availability of a machine then you can use that machine’s IP address (192.168.22.119) or server hostname (in my case it is server01). So the command will look like as the below.

ping 192.168.22.119
Ping command output
  • min: minimum time to get a response
  • avg: average time to get responses
  • max: maximum time to get a response

or

ping server01

Also, you can test the local TCP/IP. And you can test the localhost hostname or the loopback address.

ping localhost
ping 127.0.0.1

And you can also use the ping 0 command to ping the localhost

ping 0
Ping the loopback address by using the ping 0 command

How To Adjust The Number Of Pings

if you want to adjust the pings then you can use the -c option. And also you can define the number of ping messages. For example, if you want to send 3 pings then type as the below.

ping -c 3 192.168.22.119

How To Flood With Ping Command

If you want to flood with the ping command means you want to send the packets as soon as possible then you can use the -f option. So the command will look like as the below.

ping -f google.com

Conclusion

In this tutorial, you learned about ping command and usages. So if you have any questions then you can ask in the comment section.

Also, you may be like the below articles.

Leave a Reply