Skip to content

kill

13 commands

Sends signals to processes — terminate gracefully, force-kill, reload or pause.

  • processes
  • signals

Install kill

sudo apt install procps

Signals7

kill <pid>

Sends SIGTERM (15) asking the process to exit cleanly.

Link
kill -9 <pid>

SIGKILL: ends the process immediately. It cannot clean up, so use it last.

Link
kill -HUP <pid>

SIGHUP: many daemons reload their configuration on this signal.

Link
kill -STOP <pid>

Freezes a process without killing it — useful to preserve a suspicious process for memory capture.

Link
kill -CONT <pid>

Resumes a stopped process.

Link
kill -l

Lists every signal name and number.

kill -0 <pid>

Checks a process exists without sending anything.

Link

By name4

pkill <name>

Signals processes by name; -f matches the full command line.

Link
pkill -u <user>

Ends every process of a user — part of locking out a compromised account.

Link
killall <name>

Signals every process with that exact name.

Link
pgrep -l <name>

Previews which processes a pattern matches before you kill them.

Link

Jobs2

kill %<job>

Signals a background job from the current shell.

Link
fuser -k <port>/tcp

Kills whatever is listening on a port.

Link