1KILL(1) Linux Programmer's Manual KILL(1)
2
3
4
6 kill - terminate a process
7
9 kill [-s signal|-p] [--] pid...
10 kill -l [signal]
11
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 pids by command name is a local
22 extension.
23
24 If sig is 0, then no signal is sent, but error checking is still per‐
25 formed.
26
28 pid... Specify the list of processes that kill should signal. Each pid
29 can be one of five things:
30
31
32 n where n is larger than 0. The process with pid n will be
33 signaled.
34
35 0 All processes in the current process group are signaled.
36
37 -1 All processes with pid larger than 1 will be signaled.
38
39 -n where n is larger than 1. All processes in process group
40 n are signaled. When an argument of the form `-n' is
41 given, and it is meant to denote a process group, either
42 the signal must be specified first, or the argument must
43 be preceded by a `--' option, otherwise it will be taken
44 as the signal to send.
45
46 commandname
47 All processes invoked using that name will be signaled.
48
49 -s signal
50 Specify the signal to send. The signal may be given as a signal
51 name or number.
52
53 -l Print a list of signal names. These are found in
54 /usr/include/linux/signal.h
55
56 -a Do not restrict the commandname-to-pid conversion to processes
57 with the same uid as the present process.
58
59 -p Specify that kill should only print the process id (pid) of the
60 named processes, and not send any signals.
61
63 It is not possible to send a signal to explicitly selected thread in a
64 multithreaded process by kill(2) syscall. If kill(2) is used to send a
65 signal to a thread group, then kernel selects arbitrary member of the
66 thread group that has not blocked the signal. For more details see
67 clone(2) CLONE_THREAD description.
68
69 The command kill(1) as well as syscall kill(2) accepts TID (thread ID,
70 see gettid(2)) as argument. In this case the kill behavior is not
71 changed and the signal is also delivered to the thread group rather
72 than to the specified thread.
73
75 bash(1), tcsh(1), kill(2), sigvec(2), signal(7)
76
78 Taken from BSD 4.4. The ability to translate process names to process
79 ids was added by Salvatore Valente <svalente@mit.edu>.
80
82 The kill command is part of the util-linux-ng package and is available
83 from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
84
85
86
87Linux Utilities 14 October 1994 KILL(1)