kill Send a signal to a process
Sends a signal to one or more processes, identified by process ID. Its default signal asks the program to shut down cleanly, which is why it is the normal way to stop a program. Find the process ID first with ps.
Synopsis
kill [-s SIGNAL | -SIGNAL] PID...
kill -l [EXIT_STATUS]
Common options
| Option or form | What it does |
|---|---|
(none) | With only a PID, sends TERM (signal 15). The program can catch it, clean up and exit |
-9, -KILL | Send KILL. The system ends the process at once and the program cannot catch or ignore it |
-15, -TERM | Send TERM explicitly. This is the same as the default |
-HUP, -1 | Send HUP (hang up). Many background services reload their configuration when they get it |
-INT, -2 | Send INT, the same signal as pressing Ctrl+C |
-STOP, -CONT | STOP pauses a process and CONT resumes it. STOP cannot be caught |
-s SIGNAL | Another way to name the signal, for example kill -s TERM 1234 |
-l | List signal names. Given a number, prints the matching name |
Examples
kill -l
sleep 30 & kill $!
kill -l 9
KILL
kill 1234
kill -HUP 1234
kill -9 1234
Notes
- Try plain kill first. TERM lets a program save its work and remove temporary files. kill -9 gives it no chance, so it can leave corrupt files, stale lock files and orphaned child processes. Use it only when TERM has failed.
- Check the PID before you send anything. Run ps -p PID first. PIDs are reused, and a wrong number can stop the wrong program.
- You can only signal your own processes. Other users' and system processes need sudo, which is usually a sign to stop and think.
- kill is built into most shells as well as being a program, and the built-in can accept job numbers such as kill %1. The built-in and /bin/kill may format kill -l differently.
- To stop processes by name instead of ID, use pkill or killall. Their behaviour differs between macOS and Linux, so read the man page first.
See also
Last reviewed 2026-10-07.