skill
Send a signal to processes selected by user, tty, pid, or command.
Description
skill is the obsolete predecessor of pkill; both tools are kept
for compatibility, but new use cases should prefer pkill. The CLI
follows procps-ng’s quirky convention where the signal is given as a
leading -NAME or -N argument (e.g. skill -KILL -u alice), like
kill(1).
The default signal is TERM. Selectors (-t, -u, -p, -c) are
OR’d within their category and AND’d across categories.
Inputs
kill(2)syscall vialibc::killfor delivery./proc/[pid]/{stat,status,cmdline}via the sharedprocmatchmodule for selection.
Synopsis
skill [signal] [options] <expression>
expression is a list of bare PIDs (interpreted in conjunction with
-p). Selectors with explicit flags can be mixed with bare PIDs.
Arguments
| Flag | Description |
|---|---|
-<SIG> (e.g. -9, -KILL, -SIGKILL) | Signal to send. Default: TERM |
--signal SIG | Same as the leading-flag form, but in long-flag style |
-l, --list | List all signal names |
-L, --table | List all signal names in a numbered table |
-n, --no-action | Don’t send signals; just print matching PIDs |
-v, --verbose | Print the PID and comm of each signaled process |
-t, --tty TTY | Match processes whose controlling tty is TTY (repeatable) |
-u, --user USER | Match processes whose effective user is USER (name or numeric UID, repeatable) |
-p, --pid PID | Match processes by PID (repeatable) |
-c, --command CMD | Match processes whose comm is exactly CMD (repeatable) |
--help / -V, --version | Help / version |
The signal can appear anywhere on the command line; it is rewritten
internally to --signal SIG before clap parses argv (see
preprocess_argv). Bare positional integers are added to the PID list.
Behavior
Selection
procmatch::find_matching_processes is used to enumerate /proc and
apply filters. -c values are turned into an anchored alternation regex
over comm (^(cmd1|cmd2|...)$). -p values become an exact PID
filter.
-l / -L
Identical output to kill -l / kill -L. Standard signals 1–31 only;
real-time signals are omitted.
-n (no-action)
Prints matching PIDs, one per line, in ascending order. Useful as a dry-run before signaling.
-v (verbose)
For each successfully signaled process, prints pid: comm.
Notes
-i(interactive),-f(fast),-w(warnings) and--ns/--nslist(namespace selection) are listed in the upstream man page but not implemented here.- Real-time signals (
SIGRTMIN..SIGRTMAX) cannot currently be expressed via name; they can be sent via--signal Nfor the corresponding number.
Exit codes
| Code | Meaning |
|---|---|
| 0 | At least one process matched and was signaled (or list/table requested) |
| 1 | No processes matched, or all signal deliveries failed |
| 2 | Usage error (unknown signal, no expression given, invalid argument) |