commands
pkill — signal matching processes
Select processes by pattern and signal them (TERM by default). Broad patterns can affect unrelated processes. This reference deliberately uses only help, not a signal action. Use a fresh private workspace, ordinary user and bounded child processes; no sudo.
Formal Syntax & Structure
linux syntaxlinux
pkill [OPTIONS] PATTERNParameters & Attributes
| Name | Type | Description |
|---|---|---|
| PATTERN | operand | process-name expression |
| -P | option | parent restriction |
| -x | option | exact match |
Return Value
exit status and output
Select processes by pattern and signal them (TERM by default). Broad patterns can affect unrelated processes. This reference deliberately uses only help, not a signal action.
Working Example
Example Snippetlinux
pkill --help | grep -F -- '-P' >/dev/null && printf 'parent filter documented\n'