Where to start First steps track · 15 stages
Linux Labs

kill — send a signal to a process

cheat sheet · Ubuntu 24.04 · Bash 5.2 · procps-ng 4.0.4 https://lab.dimsanych.ru/en/wiki/kill/

Cheat sheet

  • kill 1234 SIGTERM: ask it to exit
  • kill -TERM 1234 the same, explicitly (-15)
  • kill -HUP 1234 reload settings (for many services)
  • kill -KILL 1234 SIGKILL: end at once, no cleanup (-9)
  • kill -STOP 1234 pause; -CONT resumes
  • kill -0 1234 is the process alive (sends nothing)
  • kill %1 job 1 of this terminal
  • kill -l list of signals
  • pkill -f 'python app.py' by a command-line pattern
  • pkill -u student sleep by name, for one user

Options

The kill you type is a Bash builtin: it understands %1 (a job number). The separate program /bin/kill does the same for PIDs. Full list — help kill and man kill.

Loading…