Thrum

How do you kill a process in Terminal on a Mac?

Last reviewed: 19 November 2026.

Find the process's PID with pgrep -l and a name, then run kill followed by the PID. That sends the TERM signal, which asks the process to quit cleanly; if it ignores it, kill -9 followed by the PID sends KILL, which cannot be ignored. Processes owned by root or another user need sudo in front.

What are the steps to kill a process?

  1. Find the PID. Run pgrep -l Preview, replacing Preview with part of the process name. Note the number at the start of the line.
  2. Ask it to quit. Run kill 1234 with that PID. This sends TERM (signal 15), the default.
  3. Check that it exited. Run pgrep -l Preview again. No output means the process is gone.
  4. Force it only if needed. If it is still running after a few seconds, run kill -9 1234. KILL (signal 9) ends the process immediately; unsaved work in it is lost.
  5. Use sudo for system processes. For a process owned by root or another user, run sudo kill 1234 and enter your administrator password. The kill man page notes that only the super-user may signal other users' processes.

What is the difference between kill, killall and pkill?

CommandSelects processes byExample
killPIDkill 1234
killallExact process namekillall Preview
pkillPart of the name, or the full command line with -fpkill -f "Helper (Renderer)"

killall and pkill signal every matching process, so check the match first with pgrep -l using the same pattern. A pattern that is too short can match more than you meant.

Which signals matter?

Run kill -l to list every signal name.

What if the process comes straight back?

Many macOS processes are launchd jobs that launchd restarts when they exit, such as the Dock, Finder and most system daemons. Killing them only helps if the new copy behaves better. To stop a third-party background job from starting at all, remove it in System Settings > General > Login Items & Extensions. See how to see launch agents and daemons.

Do not kill kernel_task, launchd, WindowServer or loginwindow. Killing WindowServer or loginwindow logs you out and closes every app without saving.

How can Thrum help?

Thrum keeps a live CPU graph in the menu bar. One click shows the eight processes using the most CPU. An optional alert tells you when a process stays above a CPU level you choose (50 to 200% of one core) for 1 to 10 minutes.

Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.

Questions

Is kill -9 bad?

It is safe for the Mac but not for the app's data: the process cannot save or clean up. Use plain kill first and keep -9 for processes that do not respond.

Why does kill say Operation not permitted?

The process belongs to root or another user. Run the command again with sudo in front.

Is there a graphical way to send a signal?

Yes. In Activity Monitor, select the process and choose View > Send Signal to Process, pick a signal and click Send.

Sources