Differences between ping and ping -c 3 option

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

ping -c 3 

and

ping 

Any help or information is appreciated. Thanks!

1

2 Answers

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 

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.

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.

ping 

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like