← linux commands
ping command
The ping command is used to check connection to some host.
Syntax: ping [options] host
Example:
ping akulsrivastava.com

Lets understand what following line means:
64 bytes from 76.76.21.21 (76.76.21.21): icmp_seq=1 ttl=37 time=21.4 ms
Here, each of this line refers that a packet is sent to the host server called as echo request. And, the server replies the packet request called as echo reply request.
The address shown is the IP Address of the host.
ICMP stands for Internet Control Message Protocol, and icmp_seq basically tells the sequence of packet sent.
Time key i.e. time tells the duration it took to sent and recieve packet from the server.
At the bottom, it tells the minimum, average, maximun and median deviation values for packet timings.
Options:
Example:
ping -c 3 akulsrivastava.com

Default value is one second, the below example will set interval of 3 seconds i.e. each packet is sent after 3 second.
Example
ping -i 3 akulsrivastava.com