]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/kill.1
9644564badb1829841b5c8134b4c6e319fe09dd2
[thirdparty/util-linux.git] / misc-utils / kill.1
1 .\" Copyright 1994 Salvatore Valente (svalente@mit.edu)
2 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
3 .\" May be distributed under the GNU General Public License
4 .TH KILL 1 "14 October 1994" "Linux Utilities" "Linux Programmer's Manual"
5 .SH NAME
6 kill \- terminate a process
7 .SH SYNOPSIS
8 .BI "kill [ \-s " signal " | \-p ] [ \-a ] [ \-\- ] " "pid ..."
9 .br
10 .BI "kill -l [ " signal " ]"
11 .SH DESCRIPTION
12 The command
13 .B kill
14 sends the specified signal to the specified process or process group.
15 If no signal is specified, the TERM signal is sent. The TERM signal
16 will kill processes which do not catch this signal. For other processes,
17 it may be necessary to use the KILL (9) signal, since this signal cannot
18 be caught.
19 .PP
20 Most modern shells have a builtin kill function, with a usage rather similar
21 to that of the command described here. The `-a' and `-p' options,
22 and the possibility to specify pids by command name is a local extension.
23 .PP
24 If sig is 0, then no signal is sent, but error checking is still performed.
25 .SH OPTIONS
26 .TP
27 .IR pid ...
28 Specify the list of processes that
29 .B kill
30 should signal. Each
31 .I pid
32 can be one of five things:
33
34 .RS
35 .TP
36 .I n
37 where
38 .I n
39 is larger than 0. The process with pid
40 .I n
41 will be signaled.
42 .TP
43 .B 0
44 All processes in the current process group are signaled.
45 .TP
46 .B -1
47 All processes with pid larger than 1 will be signaled.
48 .TP
49 .BI - n
50 where
51 .I n
52 is larger than 1.
53 All processes in process group
54 .I n
55 are signaled. When an argument of the form `-n' is given,
56 and it is meant to denote a process group,
57 either the signal must be specified first, or the argument must be preceded
58 by a `--' option, otherwise it will be taken as the signal to send.
59 .TP
60 .I commandname
61 All processes invoked using that name will be signaled.
62 .RE
63 .TP
64 .BI \-s " signal"
65 Specify the signal to send.
66 The signal may be given as a signal name or number.
67 .TP
68 .B \-l
69 Print a list of signal names. These are found in
70 .I /usr/include/linux/signal.h
71 .TP
72 .B \-a
73 Do not restrict the commandname-to-pid conversion to processes
74 with the same uid as the present process.
75 .TP
76 .B \-p
77 Specify that
78 .B kill
79 should only print the process id (pid)
80 of the named processes, and not send any signals.
81 .SH "SEE ALSO"
82 .BR bash (1),
83 .BR tcsh (1),
84 .BR kill (2),
85 .BR sigvec (2),
86 .BR signal (7)
87 .SH AUTHOR
88 Taken from BSD 4.4. The ability to translate process names to process
89 ids was added by Salvatore Valente <svalente@mit.edu>.
90 .SH AVAILABILITY
91 The kill command is part of the util-linux-ng package and is available from
92 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.