Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know what the differences between using the commands :

ping -c 3



Any help or information is appreciated. Thanks!

share|improve this question
Please learn to use man, man ping will tell you everything you need to know. You should also try researching before posting here, that way you won't get downvoted. – terdon Feb 25 '14 at 11:03
up vote 5 down vote accepted

ping -c option will specify the number of packets sent and will stop after counting them , here in you example count is 3 .

enter image description here


will send infinite packets until you stop it by closing or ctrl+c

For more information about ping options

Ping Options

Or use man ping in terminal .

Try it.

share|improve this answer
ping -c 3

will send exactly three ping requests to Google, after which the program terminates. It doesn't matter whether there are replys for (some of) the requests or not.


will endlessly send ping requests to Google, and the ping command will never terminate until you end it manually using, e.g., Ctrl+c.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.