killall(1)
Send a signal to all processes matching a given name.
Synopsis
killall [OPTION]... NAME...Description
killall sends a specified signal (default SIGTERM) to all processes with the given NAME. It is useful for terminating multiple instances of a program without needing their individual process IDs.
By default, killall will refuse to kill processes if the name is longer than 15 characters or if no matching processes are found. The command matches process names from the command line, which may differ from the full executable path.
Common options
| Flag | What it does |
|---|---|
-9, --kill | Send SIGKILL instead of SIGTERM (forcefully terminate without cleanup) |
-15, --term | Send SIGTERM (graceful termination, the default) |
-SIGNAL | Send a specific signal by name or number (e.g., -HUP, -USR1) |
-i, --interactive | Prompt for confirmation before killing each process |
-v, --verbose | Print the name and PID of each process killed |
-w, --wait | Wait until all killed processes have terminated |
-u, --user USERNAME | Only kill processes owned by the specified user |
-y, --younger-than TIME | Only kill processes younger than the specified time (e.g., 1h, 30m) |
-o, --older-than TIME | Only kill processes older than the specified time |
-e, --exact | Require an exact match of the process name (no partial matches) |
Examples
Gracefully terminate all Firefox processes
killall firefoxForcefully kill all Java processes without allowing cleanup
killall -9 javaKill all Apache2 processes owned by a specific user
killall -u username apache2Interactively prompt before killing each Node.js process
killall -i nodeTerminate all Python processes, print their PIDs, and wait for them to exit
killall -v -w pythonSend SIGHUP to reload configuration in all SSHD processes
killall -HUP sshdKill all kworker processes older than 7 days
killall -o 7d kworker