On Unix-like operating systems, kill is a builtin command of the Bash shell. It sends a signal to a process.

Description

If no signal is specified, kill sends signal 9 (SIGTERM, terminate process).

This page covers the bash builtin version of kill, which is distinct from the standalone binary executable, /bin/kill. To figure out which of these is the default kill on your system, run type kill.

  • Description
  • Syntax
  • Examples
  • Bash builtins help
  • Linux commands help

Multiple processes may be specified, either by process ID (pid), or by job specifier (jobspec). For more information about jobs, see Job control in bash.

For more information about signals, see Signals in bash.

Syntax

To send a signal to process(es):

kill { -sigspec | -s sigspec | -n signum } {{ jobspec | pid } [ … ] }

To list available signals, or translate a signal name or number:

kill -l [sigspec]

Options

Examples

type kill

Determine if running the kill command will execute a separate binary, or the bash built-in. (The executable /bin/kill has slightly different options; read the kill command documentation for more info.)

Example output:

kill is a shell builtin

The following seven commands all do the same thing:

kill -15 907 2331 19052

kill -TERM 907 2331 19052

kill -SIGTERM 907 2331 19052

kill -n 15 907 2331 19052

kill -s 15 907 2331 19052

kill -s TERM 907 2331 19052

kill -s SIGTERM 907 2331 19052

Each of these commands sends signal number 15 (TERM) to three processes: PIDs 907, 2331, and 19052.

kill -l SIGSTOP

Translate signal name TERM to its number. Output:

19

kill -l STOP

Same as the previous command. Output:

kill -l 19

Translate signal number 15 to its name. Output:

STOP

kill -l

List all available signals. Example output:

  1. SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
  2. SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
  3. SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
  4. SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
  5. SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
  6. SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
  7. SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
  8. SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
  9. SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
  10. SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
  11. SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
  12. SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
  13. SIGRTMAX-1 64) SIGRTMAX

/bin/kill — Send signals to processes.