When to use killall
Use killall carefully when several processes share the same name. Inspect the exact matches and user first; name-based selection can affect more work than one PID-based operation.
Syntax
killall [PARAMETERS] NAME…Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
View help Linux version
killall --helpThe installed implementation's usage is displayed without signalling processes.
Find candidates first
pgrep -a -x sleepExact-name sleep processes are listed before any termination.
End selected test processes with confirmation
killall -i -u "$USER" -s TERM sleepMatching processes owned by the current user require interactive confirmation before a graceful signal.
Notes and limitations
- This command can affect several processes at once. Specify the user and confirm the selection.
- These examples use psmisc killall on Linux. Commands with the same name on other Unix systems may behave differently.
Common questions and troubleshooting
Why is killall risky on unfamiliar systems?
Implementations can differ across operating systems. Read the local manual and inspect matches before assuming Linux name-matching semantics.
How do I avoid terminating another user's work?
Restrict selection to the intended account and confirm each match. A specific verified PID is preferable when only one process should stop.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man killall.