killall
Kill processes by name
Overview
killall sends a signal to all processes running any of the specified commands. If no signal is specified, the TERM signal is sent.
Syntax
killall [OPTION]... NAME...Common Options
-s SIGNAL, --signal SIGNALSend a specific signal (name or number, e.g., -9 or -KILL). Defaults to SIGTERM.
-e, --exactRequire an exact match for names, especially useful for long names.
-i, --ignore-caseIgnore case distinctions in the process name.
-l, --listList all known signal names.
-o, --older-than TIMEMatch only processes older than the specified time in seconds.
-y, --younger-than TIMEMatch only processes younger than the specified time in seconds.
-q, --quietSuppress 'no process found' messages.
-r, --regexpInterpret process name pattern as an extended regular expression.
-u, --user USERKill only processes belonging to USER.
-v, --verboseReport if the signal was successfully sent.
-w, --waitWait for all killed processes to die.
-I, --interactivePrompt for confirmation before killing.
Examples
Sends SIGTERM to all processes exactly named firefox.
Sends SIGKILL to all processes named specific-daemon.
Kills all processes named MyProcess (and variations like myprocess), ignoring case.
Kills all gedit processes belonging to user john_doe.
Forcibly kills hung_app and waits for it to terminate.
Kills old_script processes older than 1 day.
Kills processes whose names start with "batch_job_" using a regular expression.
Asks for confirmation before sending SIGTERM to suspicious_process.