The ping command sends ICMP echo request packets to a destination. For example, you could run ping google.com or ping 126.96.36.199 to ping a domain name or IP address.
These packets ask the remote destination to reply. If the remote destination is configured to reply, it will respond with packets of its own.
You’ll be able to see how long the round-trip time is between your computer and the destination. You’ll see a “request timed out” message if packet loss is occurring, and you’ll see an error message if your computer can’t communicate with the remote host at all.
This tool can help you troubleshoot Internet connection problems, but bear in mind that many servers and devices are configured not to reply to pings.
In Linux, ping sends ECHO_REQUEST packets to the address you specify. It’s a great way to see whether your computer can communicate with the Internet or a specific IP address.
Unlike the ping command on Windows, the Linux ping command will keep sending packets until you terminate it. You can specify a finite amount of packets with the -c switch.
ping -c 4 google.com