1KILL(1)                          User Commands                         KILL(1)
2
3
4

NAME

6       kill - terminate a process
7

SYNOPSIS

9       kill [-s signal|-p] [-q sigval] [-a] [--] pid...
10       kill -l [signal]
11

DESCRIPTION

13       The command kill sends the specified signal to the specified process or
14       process group.  If no signal is specified, the  TERM  signal  is  sent.
15       The  TERM  signal  will  kill processes which do not catch this signal.
16       For other processes, it may be necessary to use the  KILL  (9)  signal,
17       since this signal cannot be caught.
18
19       Most  modern  shells  have a builtin kill function, with a usage rather
20       similar to that of the command  described  here.   The  '-a'  and  '-p'
21       options, and the possibility to specify processes by command name are a
22       local extension.
23
24       If sig is 0, then no signal is sent, but error checking is  still  per‐
25       formed.
26

OPTIONS

28       pid... Specify the list of processes that kill should signal.  Each pid
29              can be one of five things:
30
31              n      where n is larger than 0.  The process with pid n will be
32                     signaled.
33
34              0      All processes in the current process group are signaled.
35
36              -1     All processes with pid larger than 1 will be signaled.
37
38              -n     where n is larger than 1.  All processes in process group
39                     n are signaled.  When an argument of  the  form  '-n'  is
40                     given,  and it is meant to denote a process group, either
41                     the signal must be specified first, or the argument  must
42                     be  preceded by a '--' option, otherwise it will be taken
43                     as the signal to send.
44
45              commandname
46                     All processes invoked using that name will be signaled.
47
48       -s, --signal signal
49              Specify the signal to send.  The signal may be given as a signal
50              name or number.
51
52       -l, --list [signal]
53              Print  a  list of signal names, or convert signal given as argu‐
54              ment to a name.  The signals are  found  in  /usr/include/linux/
55              signal.h
56
57       -L, --table
58              Similar to -l, but will print signal names and their correspond‐
59              ing numbers.
60
61       -a, --all
62              Do not restrict the commandname-to-pid conversion  to  processes
63              with the same uid as the present process.
64
65       -p, --pid
66              Specify  that kill should only print the process id (pid) of the
67              named processes, and not send any signals.
68
69       -q, --queue sigval
70              Use sigqueue(2) rather than kill(2) and the sigval  argument  is
71              used  to  specify an integer to be sent with the signal.  If the
72              receiving process has installed a handler for this signal  using
73              the  SA_SIGINFO  flag  to  sigaction(2), then it can obtain this
74              data via the si_value field of the siginfo_t structure.
75

NOTES

77       It is not possible to send a signal to explicitly selected thread in  a
78       multithreaded process by kill(2) syscall.  If kill(2) is used to send a
79       signal to a thread group, then kernel selects arbitrary member  of  the
80       thread  group  that  has  not blocked the signal.  For more details see
81       clone(2) CLONE_THREAD description.
82
83       The command kill(1) as well as syscall kill(2) accepts TID (thread  ID,
84       see  gettid(2))  as  argument.   In  this case the kill behavior is not
85       changed and the signal is also delivered to  the  thread  group  rather
86       than to the specified thread.
87

SEE ALSO

89       bash(1), tcsh(1), kill(2), sigvec(2), signal(7)
90

AUTHOR

92       Taken  from BSD 4.4.  The ability to translate process names to process
93       ids was added by Salvatore Valente ⟨svalente@mit.edu⟩.
94

AVAILABILITY

96       The kill command is part of the util-linux  package  and  is  available
97       from  Linux  Kernel Archive ⟨ftp://ftp.kernel.org/pub/linux/utils/util-
98       linux/⟩.
99
100
101
102util-linux                        March 2013                           KILL(1)
Impressum