2 min read

Terminating Processes with Kill on macOS Tahoe

Sometimes applications freeze or background processes become unresponsive. While you can use Activity Monitor to force quit apps, the kill command in the terminal offers precision and scripting capabilities.

Finding the Process ID (PID)

To kill a specific process, you first need its unique Process ID (PID). You can find this using the ps or pgrep commands.

Using pgrep

The easiest way to find a PID by name:

pgrep Chrome

This returns the PIDs of all processes matching "Chrome".

Using ps

For more detail:

ps aux | grep "Chrome"

The Kill Command

Once you have the PID, use kill to send a signal to the process.

Standard Termination (SIGTERM)

By default, kill sends a SIGTERM (15) signal. This asks the process to stop nicely, allowing it to save data and close connections.

kill 12345

(Replace 12345 with your actual PID)

Force Kill (SIGKILL)

If a process is completely frozen and ignores the standard kill command, use the -9 flag to send a SIGKILL signal. This stops the process immediately.

kill -9 12345

Killing by Name: killall

If you want to kill all instances of an application by name without looking up the PID, use killall.

Example: Force quit all Chrome processes.

killall "Google Chrome"

Note: The name must match the process name exactly. It is case-sensitive.

Summary of Signals

Signal Number Description
SIGTERM 15 Polite request to terminate (Default).
SIGKILL 9 Immediate, forceful termination.
SIGHUP 1 Hang up. Often used to reload configuration files without stopping the process.

For graphical process management, refer to Troubleshooting Performance with Activity Monitor on macOS Tahoe.