$linuxjunkies
>

killall(1)

Send a signal to all processes matching a given name.

UbuntuDebianFedoraArch

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

FlagWhat it does
-9, --killSend SIGKILL instead of SIGTERM (forcefully terminate without cleanup)
-15, --termSend SIGTERM (graceful termination, the default)
-SIGNALSend a specific signal by name or number (e.g., -HUP, -USR1)
-i, --interactivePrompt for confirmation before killing each process
-v, --verbosePrint the name and PID of each process killed
-w, --waitWait until all killed processes have terminated
-u, --user USERNAMEOnly kill processes owned by the specified user
-y, --younger-than TIMEOnly kill processes younger than the specified time (e.g., 1h, 30m)
-o, --older-than TIMEOnly kill processes older than the specified time
-e, --exactRequire an exact match of the process name (no partial matches)

Examples

Gracefully terminate all Firefox processes

killall firefox

Forcefully kill all Java processes without allowing cleanup

killall -9 java

Kill all Apache2 processes owned by a specific user

killall -u username apache2

Interactively prompt before killing each Node.js process

killall -i node

Terminate all Python processes, print their PIDs, and wait for them to exit

killall -v -w python

Send SIGHUP to reload configuration in all SSHD processes

killall -HUP sshd

Kill all kworker processes older than 7 days

killall -o 7d kworker

Related commands