pkill

Send signals to processes matched by name or attributes.

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
pgrep -a <pattern>Preview which processes match.
pkill -x -TERM <name>Exact name, graceful signal.
What it does

pkill sends signals to all processes matching a name pattern or other criteria. The default signal is SIGTERM (graceful shutdown). With -9 (SIGKILL), it force-kills. Always verify with pgrep first — pkill applies to all matches.

Common flags
FlagMeaning
-f --fullMatch against full command line
-u --euidMatch by user
-signalSignal to send (default: SIGTERM/15)
-9Force kill (SIGKILL)
-HUPSend SIGHUP (reload config for many daemons)
Examples
pkill -HUP nginxReload nginx config (graceful) · explain & risk-check →
pkill -u www-dataTerminate all processes owned by www-data · explain & risk-check →
pkill -f 'python.*stale_worker'Kill stale workers by command pattern · explain & risk-check →
pgrep java && pkill -9 javaVerify then force-kill all Java processes · explain & risk-check →
Pro tip

Always run `pgrep -a pattern` before `pkill pattern` to see exactly what will be affected — pkill's output tells you nothing about what it killed.

Related
pgrep kill ps
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man pkill for your version. Test destructive commands on a non-production system first.