killall - kill named processes
killall [ [-]signal ]
killall [ -gv ] [ -k secs ] [ [-]signal ] [ pname ...]
killall [ -gv ] [ -k secs ] [ -signame ] [ pname ...]
killall sends a signal to a set of processes or process groups specified
by pname(s). It is similar to kill(1), except that it allows processes
to be specified by name and has special options used by shutdown(1M).
When no processes are specified, killall terminates all processes that
are not in the same process group as the caller. This form is for use in
shutting down the system and is only available to the superuser.
The options to killall are:
Specifies the signal number. The minus (-) is required if
pname looks like a signal number. If no signal value is
specified, a default of 9 (KILL) is used.
pname When a process is specified with pname, killall sends signal to
all processes matching that name. This form is available to
all users provided that their user ID matches the real, saved,
or effective user ID of the receiving process. The signal
number must be preceded by a minus (-) if pname looks like a
signame A mnemonic name for the signal can be used; see the -l option.
-g Causes the signal to be sent to the named processes' entire
process group. In this form, the signal number should be
preceded by - in order to disambiguate it from a process name.
-k secs Allows the user to specify a maximum time to die for a process.
With this option, an argument specifying the maximum number of
seconds to wait for a process to die is given. If after
delivery of the specified signal (which defaults to SIGTERM
when using the -k option), killall waits for either the process
to die or for the time specified by secs to elapse. If the
process does not die in the allotted time, the process is sent
-l Lists the signal names (see kill(1) for more information about
signal naming). For example,
killall 16 myproc
killall -16 myproc
killall -USR1 myproc
-v Reports if the signal was successfully sent.
killall can be quite useful for killing a process without knowing its
process ID. It can be used to stop a run-away user program without
having to wait for ps(1) to find its process ID. It can be particularly
useful in scripts, because it makes it unnecessary to run the output of
ps(1) through grep(1) and then through sed(1) or awk(1).
fuser(1M), kill(1), ps(1), shutdown(1M), signal(2).
PPPPaaaaggggeeee 2222 [ Back ]