HxHippy

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 SIGNAL

Send a specific signal (name or number, e.g., -9 or -KILL). Defaults to SIGTERM.

-e, --exact

Require an exact match for names, especially useful for long names.

-i, --ignore-case

Ignore case distinctions in the process name.

-l, --list

List all known signal names.

-o, --older-than TIME

Match only processes older than the specified time in seconds.

-y, --younger-than TIME

Match only processes younger than the specified time in seconds.

-q, --quiet

Suppress 'no process found' messages.

-r, --regexp

Interpret process name pattern as an extended regular expression.

-u, --user USER

Kill only processes belonging to USER.

-v, --verbose

Report if the signal was successfully sent.

-w, --wait

Wait for all killed processes to die.

-I, --interactive

Prompt for confirmation before killing.

Examples

$ killall firefox

Sends SIGTERM to all processes exactly named firefox.

$ killall -9 specific-daemon

Sends SIGKILL to all processes named specific-daemon.

$ killall -i MyProcess

Kills all processes named MyProcess (and variations like myprocess), ignoring case.

$ killall -u john_doe gedit

Kills all gedit processes belonging to user john_doe.

$ killall -w -SIGKILL hung_app

Forcibly kills hung_app and waits for it to terminate.

$ killall --older-than 1d old_script

Kills old_script processes older than 1 day.

$ killall -r "^batch_job_.*"

Kills processes whose names start with "batch_job_" using a regular expression.

$ killall -I -TERM suspicious_process

Asks for confirmation before sending SIGTERM to suspicious_process.

processsignalterminatekillnamekillall