Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

ping -c 3 www.google.com


ping www.google.com

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

2 Answers 2

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

ping www.google.com

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 www.google.com

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.

ping www.google.com

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.