How to stop a process in Terminal
558,783
Solution 1
Ctrl + C
Ctrl + C is a the standard *nix way of signaling a process to abort.
Solution 2
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.
Related videos on Youtube
Author by
gardenofwine
Updated on September 17, 2022Comments
-
gardenofwine over 1 year
Possible Duplicate:
Ending a process in unix instead of interrupting itWhen 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.-
Admin over 8 yearsThis was useful to me coming from Linux. I had no idea Ctrl+Break was what I needed on Windows :)
-
-
Kyle Bridenstine about 7 yearsMy Mac just beeps at me when I try this.
-
Wizard of Kneup about 7 yearsMr. Tea: are you using Command instead of Control?
-
Pacerier almost 7 years@heavyd, Why does
man
useq
instead of ctrlC to quit? What's the rationale? -
heavyd over 6 years@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.
-
Abhinav Saxena over 3 yearsCtrl + c does not work on zsh, MacOS Catalina.
-
Abhinav Saxena over 3 yearsCtrl + c or ctrl + z does not work on zsh, MacOS Catalina.
-
Brian D over 3 yearsCommand + . is how you do it in Mac Terminal
-
Leo Caseiro almost 3 yearsTry CMD + (.) period/dot
-
Chris over 2 yearsCMD + (.) period/dot works!