$linuxjunkies
>

kill(1)

Send a signal to a process, typically to terminate it.

UbuntuDebianFedoraArch

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

FlagWhat it does
-lList all available signal names and numbers
-s SIGNALSpecify the signal by name (e.g., -s TERM, -s KILL)
-9Send KILL signal; forces immediate termination (cannot be caught)
-15Send TERM signal (default); requests graceful termination
-19Send STOP signal; pauses process execution
-18Send CONT signal; resumes a stopped process
-pPrint process IDs only (used with pgrep and pkill)

Examples

Send TERM signal to process 1234, allowing it to shut down gracefully

kill 1234

Force kill process 1234 immediately with KILL signal (use as last resort)

kill -9 1234

Display all available signals with their numbers

kill -l

Pause process 1234 without terminating it

kill -STOP 1234

Resume a stopped process 1234

kill -CONT 1234

Force kill all Firefox processes by matching process name

kill -9 $(pgrep firefox)

Send TERM signal to multiple processes at once

kill 1234 5678 9012

Related commands