Possible Duplicate:
Ending a process in unix instead of interrupting it

When I task in Terminal, such as ping blah.com, how do I then stop this task (other than closing the Terminal window. In Windows, you can Ctrl+Break pretty much any terminal based process, but I can't figure out the way to do it on the Mac.

  • This was useful to me coming from Linux. I had no idea Ctrl+Break was what I needed on Windows :) Oct 28 '15 at 14:18

Ctrl + C

Ctrl + C is a the standard *nix way of signaling a process to abort.

  • 11
    My Mac just beeps at me when I try this. Mar 24 '17 at 18:52
  • 15
    Mr. Tea: are you using Command instead of Control? May 1 '17 at 9:40
  • @heavyd, Why does man use q instead of ctrlC to quit? What's the rationale?
    – Pacerier
    Aug 16 '17 at 0:13
  • 2
    Ctrl + c does not work on zsh, MacOS Catalina. Aug 19 '20 at 14:18
  • 1
    Command + . is how you do it in Mac Terminal
    – Brian D
    Oct 15 '20 at 22:26

Try Ctrl + C. Also, Ctrl + Z might help if you want to suspend a process.

For further information, man kill.

If you're curious about the difference between suspend and terminate, this answer is a good starting point; the TL;DR version is, a suspended process can be resumed later and its execution can continue. A terminated (and killed) process will be gone.

  • 4
    Ctrl + c or ctrl + z does not work on zsh, MacOS Catalina. Aug 19 '20 at 14:19
  • 1
    Try CMD + (.) period/dot Jun 15 at 9:42
  • CMD + (.) period/dot works!
    – Vivek
    Aug 30 at 16:29
