ping command stands for Packet Internet Groper.
This command checks the connectivity between two nodes. And finds whether a server is reachable or not.
The Linux ping command keeps executing and sends the packet until you interrupt. This tool also checks your bandwidth connection or packet transfer rate.
Uses of ping
[To stop from execution press Ctrl + C ]
Sample syntax of ping:
$ ping <destination>
Example of ping:
$ ping google.com
ping using IP address
$ ping 22.214.171.124
So, we can use a domain name, which resolves into an ip address first. Or, we can use an ip address to ping.
ping to limit the packets
If you don’t want to continuously send packets, you can specify how many packets to send. Use the
-c options to specify number of packets to send.
Sample syntax of ping limit :
$ ping -c <number> <destination>
Example ping -c :
$ ping -c 5 example.com
After run the command and see your terminal, packets are limited to 5 without pressing keys.