kill
sends a signal to a process, usually to stop it
TLDR
SYNOPSIS
kill [-signal] pid...kill -l
DESCRIPTION
kill sends a signal to a process, usually to stop it. All signals except SIGKILL and SIGSTOP can be intercepted by the process to perform a clean exit. By default, SIGTERM is sent.
PARAMETERS
-l, --list
List signal names, or convert signal number to name-L, --table
List signal names and numbers in a table-s signal
Specify signal to send-signal
Specify signal by name or number (e.g., -9, -KILL, -SIGKILL)-p, --pid
Print the process ID only; do not send a signal-q, --queue value
Send the signal using sigqueue(3) with the accompanying integer valuepid
Process ID to signal. A PID of 0 signals all processes in the current process group. A PID of -1 signals all processes with PID > 1.%job_id
Job ID from shell job control
COMMON SIGNALS
SIGTERM (15): Request termination (default)SIGKILL (9): Force immediate termination (cannot be caught)SIGHUP (1): Hang up; often used to reload configurationSIGINT (2): Interrupt (Ctrl+C)SIGSTOP (19): Pause process (cannot be caught)SIGCONT (18): Continue paused process
CAVEATS
SIGKILL (-9) should be used as a last resort as it doesn't allow the process to clean up. Use SIGTERM first and give the process time to exit gracefully.
HISTORY
Part of standard Unix since early versions. The kill command has been available since Version 4 AT&T UNIX (1973).
