Home Tips and Instructions Linux & UNIX How to Stop the Ping Command in Terminal
How to Stop the Ping Command in Terminal PDF Print E-mail

The quick answer is: ctrl+c.

A more descriptive answer is:
The default setting for ping on Linux/UNIX systems (including SCO, Linux, BSD, and Mac OSX) is to keep running until you hit the interrupt key. The interrupt key is usually delete on SCO, and ctrl+c anywhere else

The -c option of ping specifies a count. So if you wish to set the number of pings before running it use the following command:
ping -c # address

where # is the number of pings. For example, if you wanted to ping the IP address 192.168.1.1 three times you would type:

ping -c 3 192.168.1.1