73

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.

marked as duplicate by John T, BinaryMisfit Feb 2 '10 at 18:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

Ctrl + C

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

  • 3
    My Mac just beeps at me when I try this. – Kyle Bridenstine Mar 24 '17 at 18:52
  • 6
    Mr. Tea: are you using Command instead of Control? – Wizard of Kneup 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
  • @Pacerier, I can't really say why, you'd have to talk to the developers to figure that out. Processes can capture the Ctrl + C signal and do something else if they choose, but by default the behavior of Ctrl + C is abort the process. – heavyd Aug 16 '17 at 15:38
28

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.

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