KILLALL(1)
โจ KILLALL(1) โจ
killall is the User Commands page for this one, bestie ๐
๐ NAME
killall - kill processes by name ๐ช
๐ง SYNOPSIS
killall [-Z, --context pattern] [-e, --exact] [-g, --process-group] [-i, --interactive] [-n, --ns PID] [-o, --older-than TIME] [-q, --quiet] [-r, --regexp] [-s, --signal SIGNAL, -SIGNAL] [-u, --user user] [-v, --verbose] [-w, --wait] [-y, --younger-than TIME] [-I, --ignore-case] [-V, --version] [--] name ...
killall -l, --list
killall -V, --version
๐ธ DESCRIPTION
okay so killall sends a signal to all the processes running any of the commands you name ๐
If you don't pick a signal name, it sends SIGTERM by default. ngl that's the polite option ๐ซถ
Signals can be picked by name (like -HUP or -SIGHUP), by number (like -1), or with the -s option ๐ฆ
Here's the vibe: if the command name isn't a regular expression (that's -r) and it has a slash (/) in it, killall will go after any process running that particular file, no matter what it's named. Main character energy ๐
killall returns a zero return code if at least one process got killed for each command you listed. It also returns zero if you didn't list any commands at all and at least one process matched your -u and -Z search criteria. Otherwise it returns non-zero. ๐
And the iconic part: a killall process never kills itself ๐ (it can kill other killall processes though, so be careful lol)
๐ OPTIONS
-e,--exactโ require an exact match for super long names ๐ If a command name is longer than 15 characters, the full name might be unavailable (aka it's been swapped out). In that case killall would kill everything matching the first 15 characters, but with-ethose entries get skipped. If you add-valong with-e, killall prints a message for each skipped entry โจ-I,--ignore-caseโ match process names without caring about upper or lower case ๐-g,--process-groupโ kill the whole process group the process belongs to. The signal only gets sent once per group, even if you find multiple processes from the same group ๐ซง-i,--interactiveโ asks you for confirmation before killing anything. Protect your vibes ๐ก๏ธ-l,--listโ list all the signal names it knows ๐-n,--nsโ match against the PID namespace of the PID you give it. By default it matches against all namespaces ๐งฉ-o,--older-thanโ only match processes that are older (started before) the time you specify. The time is a float followed by a unit. The units ares,m,h,d,w,M,yfor seconds, minutes, hours, days, weeks, months and years ๐ฐ๏ธ-q,--quietโ don't complain if no processes got killed ๐คซ-r,--regexpโ treat the process name pattern as a POSIX extended regular expression, per regex(3) ๐-s,--signal,-SIGNALโ send this signal instead of SIGTERM ๐ฅ-u,--userโ only kill processes owned by the user you specify. Command names are optional here ๐ค-v,--verboseโ tells you if the signal was successfully sent ๐ฃ-V,--versionโ shows version info ๐ท๏ธ-w,--waitโ waits for all the killed processes to die. killall checks once per second if any of them still exist, and only returns once none are left. Heads up: killall may wait forever if the signal was ignored, had no effect, or if the process is stuck in zombie state ๐-y,--younger-thanโ only match processes that are younger (started after) the time you specify. The time is a float followed by a unit. The units ares,m,h,d,w,M,yfor seconds, minutes, hours, days, weeks, months and years ๐-Z,--contextโ specify a security context, and only kill processes whose security context matches the extended regular expression pattern you give. This one has to come before all your other arguments on the command line ๐ก๏ธ Command names are optional here too ๐ฆ
๐๏ธ FILES
/procโ the location of the proc file system ๐
๐ KNOWN BUGS
Killing by file only works for executables that are kept open during execution. So impure executables can't be killed this way ๐ญ
Be warned that typing killall name may not have the desired effect on non-Linux systems, especially when a privileged user does it ๐จ
killall -w can't tell if a process disappears and gets replaced by a new process with the same PID between scans ๐
If processes change their name, killall may not be able to match them correctly ๐ซ
killall has a limit on how many names you can specify on the command line. That number is the size of an unsigned long integer multiplied by 8. For most 32 bit systems the limit is 32, and for a 64 bit system the limit is usually 64 ๐ข
๐ SEE ALSO
kill(1), fuser(1), pgrep(1), pidof(1), pkill(1), ps(1), kill(2), regex(3) ๐
that's the whole tea, bestie ๐ซถ this page is from psmisc, dated 2023-06-17 โจ go slay your terminal ๐ ๐
๐ฆ where this page comes from
- alpine 3.22: psmisc-doc 23.7-r0 ยท GPL-2.0-or-later
- alpine 3.23: psmisc-doc 23.7-r0 ยท GPL-2.0-or-later
- alpine 3.24: psmisc-doc 23.7-r0 ยท GPL-2.0-or-later
- arch rolling: psmisc 23.7-2 ยท GPL
- debian trixie: psmisc 23.7-2 ยท GPL-2.0-or-later
- fedora 43: psmisc 23.7-6.fc43 ยท GPL-2.0-or-later
- fedora 44: psmisc 23.7-7.fc44 ยท GPL-2.0-or-later
- nixos 26.05: psmisc 23.7
- nixpkgs unstable: psmisc 23.7
- opensuse-leap 16.0: psmisc 23.7-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: psmisc 23.7-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: psmisc 23.7-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: psmisc 23.7-160000.2.2 ยท GPL-2.0-or-later
- ubuntu noble: psmisc 23.7-1build1 ยท GPL-2.0-or-later
- ubuntu questing: psmisc 23.7-2ubuntu1 ยท GPL-2.0-or-later
- ubuntu resolute: psmisc 23.7-2ubuntu2 ยท GPL-2.0-or-later
- ubuntu stonking: psmisc 23.7-2ubuntu2 ยท GPL-2.0-or-later
- Copyright 1993-2002 Werner Almesberger
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms