kill(1)
Send a signal to a process, typically to terminate it.
Synopsis
kill [OPTION] [SIGNAL] PID...Description
The kill command sends a signal to one or more processes specified by their process ID (PID). By default, it sends the TERM signal (15), which asks a process to terminate gracefully. You can specify different signals to control process behavior—KILL (9) forces immediate termination, STOP (19) pauses execution, and CONT (18) resumes a stopped process.
Signals are the primary inter-process communication mechanism in Unix/Linux. Most processes trap and handle signals, allowing them to clean up resources before exiting. The KILL signal cannot be caught or ignored, making it a last resort when other signals fail.
Common options
| Flag | What it does |
|---|---|
-l | List all available signal names and numbers |
-s SIGNAL | Specify the signal by name (e.g., -s TERM, -s KILL) |
-9 | Send KILL signal; forces immediate termination (cannot be caught) |
-15 | Send TERM signal (default); requests graceful termination |
-19 | Send STOP signal; pauses process execution |
-18 | Send CONT signal; resumes a stopped process |
-p | Print process IDs only (used with pgrep and pkill) |
Examples
Send TERM signal to process 1234, allowing it to shut down gracefully
kill 1234Force kill process 1234 immediately with KILL signal (use as last resort)
kill -9 1234Display all available signals with their numbers
kill -lPause process 1234 without terminating it
kill -STOP 1234Resume a stopped process 1234
kill -CONT 1234Force kill all Firefox processes by matching process name
kill -9 $(pgrep firefox)Send TERM signal to multiple processes at once
kill 1234 5678 9012