how to stop ping? CTRL C is not working

How to stop ping in Mac OS terminal? CTRL C is not working

Posted on Apr 11, 2021 5:15 AM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Apr 11, 2021 7:13 AM

A single control-C will not do it and it may take multiple attempts. Even then, control-C may not interrupt the ping process, and then you may need to enter control+\ several times. When that does not work, open a new Terminal window and enter the following:


pkill -9 -ix ping

This will kill ping without question.


It is a good idea to start ping with a safety net. The following will cause ping to quit after 300 seconds regardless of what it is doing:


ping -t 300 foo.com


Note that entering ⌘+Z in the Terminal does nothing except make a noise. Ping continues to run regardless. Entering control+Z only suspends ping, but does not kill it, unless you know the job number:




2 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

Apr 11, 2021 7:13 AM in response to masharibmufti

A single control-C will not do it and it may take multiple attempts. Even then, control-C may not interrupt the ping process, and then you may need to enter control+\ several times. When that does not work, open a new Terminal window and enter the following:


pkill -9 -ix ping

This will kill ping without question.


It is a good idea to start ping with a safety net. The following will cause ping to quit after 300 seconds regardless of what it is doing:


ping -t 300 foo.com


Note that entering ⌘+Z in the Terminal does nothing except make a noise. Ping continues to run regardless. Entering control+Z only suspends ping, but does not kill it, unless you know the job number:




Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to stop ping? CTRL C is not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.