The ping command

send ICMP ECHO_REQUEST to network hosts 5 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-c count
Stop after sending count ECHO_REQUEST packets.
-i interval
Wait interval seconds between sending each packet.

Examples

ping google.com

Ping until Ctrl+C

ping -c 4 google.com

Ping 4 times only

ping -i 2 host

Ping every 2 seconds

ping -c 2 google.com

Does a NAME work?

ping -c 2 8.8.8.8

Does the network itself work? (an IP needs no DNS)

Lessons that use ping