kill.1 (2010 09)
k
kill(1) kill(1)
NAME
kill - send a signal to a process; terminate a process
SYNOPSIS
kill [-s signame] pid ...
kill [-s signum] pid ...
kill -l
Obsolescent Versions:
kill -signame pid ...
kill -signum pid ...
DESCRIPTION
The
kill command sends a signal to each process specified by a pid process identifier. The default sig-
nal is
SIGTERM, which normally terminates processes that do not trap or ignore the signal.
Options
kill recognizes the following options:
-l (ell) List all values of signame supported by the implementation. No signals are sent
with this option. The symbolic names of the signals (without the SIG prefix) are
written to standard output, separated by spaces and newlines.
-s signame Send the specified signal name. The default is SIGTERM, number 15
. signame
can be specified in upper- and/or lowercase, with or without the
SIG prefix.
These values can be obtained by using the
-l option. The symbolic name SIG-
NULL represents signal value zero. See "Signal Names and Numbers" below.
-s signum Send the specified decimal signal number. The default is 15, SIGTERM. See
"Signal Names and Numbers" below.
-signame (Obsolescent.) Equivalent to
-s signame.
-signum (Obsolescent.) Equivalent to
-s signum.
Operands
pid is a process identifier, an unsigned or negative integer that can be one of the following:
>
0 The number of a process.
=
0 All processes, except special system processes, whose process group ID is equal to the process
group ID of the sender.
=
-1 All processes, except special system processes, if the user has appropriate privileges. Other-
wise, all processes, except special system processes, whose real or effective user ID is the same
as the user
ID of the sending process.
<
-1 All processes, except special system processes, whose process group ID is equal to the absolute
value of pid and whose real or effective user ID is the same as the user of the sending process.
Process numbers can be found with the
ps command (see ps (1)) and with the built-in jobs command
available in some shells.
Signal Names and Numbers
The following table describes a few of the more common signals that can be useful from a terminal. For a
complete list and a full description, see the header file
<signal.h> and the manual entry signal (5).
signum signame Name Description
0 SIGNULL Null Check access to pid
1 SIGHUP Hangup Terminate; can be trapped
2 SIGINT Interrupt Terminate; can be trapped
3 SIGQUIT Quit Terminate with core dump; can be trapped
9 SIGKILL Kill Forced termination; cannot be trapped
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1