๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

โš™๏ธ Process Management October 22, 2026 1

Linux Command: kill

Send signals to processes (terminate, stop, continue)

Terminal โ€” Process Management
Command
$ kill 1234

The kill command sends signals to processes, most commonly used to terminate them. Despite its name, kill can send any signal, not just termination signals. Signals are the primary inter-process communication mechanism in Unix/Linux. The most important signals are SIGTERM (15, graceful shutdown), SIGKILL (9, force kill), SIGHUP (1, reload configuration), and SIGSTOP/SIGCONT (pause/resume). SIGTERM is the default and allows processes to clean up before exiting. kill requires the process ID (PID). Use ps, pgrep, or pidof to find PIDs. For killing by name instead of PID, use killall or pkill.

Syntax

kill [SIGNAL] PID...

Key Options

  • -15 / -TERM โ€” Send SIGTERM โ€” graceful termination (default)
  • -9 / -KILL โ€” Send SIGKILL โ€” force kill (cannot be caught)
  • -1 / -HUP โ€” Send SIGHUP โ€” reload configuration
  • -STOP โ€” Pause a process
  • -CONT โ€” Resume a paused process
  • -l โ€” List all signal names

Examples

Graceful termination

kill 1234

Force kill

kill -9 1234

Reload configuration

kill -HUP $(cat /var/run/nginx.pid)

Pro Tips

  • Always try kill PID (SIGTERM) first. Only use kill -9 if the process does not respond. SIGKILL prevents cleanup and can leave corrupted data.
  • Use killall processname or pkill processname instead of finding the PID first. More convenient for most cases.
  • kill -0 PID does not send a signal โ€” it just checks if the process exists and you have permission to signal it. Useful in scripts.

Learn more: Full kill reference โ†’

Share this tip