Beginner Package: procps / util-linux

kill

Send a signal to a process, most commonly to terminate it.

Syntax

kill [-signal] pid

Description

kill sends a signal to a process by its PID. Despite the name, it can send any signal, not just termination — SIGTERM (default) asks a process to exit gracefully, while SIGKILL forces immediate termination.

Examples

kill 1234
Politely ask process 1234 to terminate (SIGTERM)
kill -9 1234
Forcefully terminate process 1234 (SIGKILL)
killall nginx
Send a signal to every process matching a name
Always try a plain kill before kill -9 to allow processes to clean up.

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux

Put it into practice

Learn this in context