killall Command in Linux: Kill Processes by Name

When a program misbehaves, it may leave several processes running. Modern browsers start separate worker processes, and a stuck script may have been launched several times in different terminals. Killing each one with the kill command
means looking up every PID first. The killall command skips that step: you give it a process name, and it signals every process running under that name.
This guide explains how to use killall to terminate processes by name, choose the signal to send, and narrow matches by user, age, or pattern.
Installing killall
killall is part of the psmisc package, which is preinstalled on most desktop and server distributions. If the command is missing, install it from the standard repositories.
On Ubuntu, Debian, and Derivatives:
sudo apt install psmiscOn Fedora, RHEL, and Derivatives:
sudo dnf install psmiscpsmisc version of killall affects only processes matching the given name. On some other Unix systems, such as Solaris and AIX, killall signals nearly every process on the machine, which is how those systems tear things down at shutdown. Confirm which implementation is installed before running killall on a remote system, especially as root.killall Syntax
The general syntax of the killall command is as follows:
killall [OPTIONS] NAME...NAME is the process name to match. You can pass more than one name, and killall signals every process that matches any of them. Unlike pkill, which matches partial names, killall requires the name to match exactly.
killall exits with status zero when it successfully signals at least one process for every name you supplied. If a name does not match, it prints a message and returns a non-zero status:
killall firefoxfirefox: no process foundKilling a Process by Name
To terminate a process, pass its exact name:
killall firefoxBy default, killall sends the SIGTERM signal, which asks each matching process to shut down cleanly. The command produces no output when it succeeds. Add -v to confirm what was signalled:
killall -v vlcKilled vlc(8143) with signal 15The output shows the process name, its PID, and the signal number. Signal 15 is SIGTERM.
Before sending a signal, use pgrep
to preview exact matches and their full command lines:
pgrep -a -x firefoxIf this command prints nothing, check ps -e -o pid,comm to find the process name that Linux reports.
Sending a Specific Signal
When a process ignores SIGTERM, you can send a stronger signal. The -s option accepts a signal name or number:
killall -s KILL myscriptSIGKILL cannot be caught or ignored, so the process is terminated immediately without a chance to clean up. The same signal can be written in two shorter forms:
killall -9 myscript
killall -SIGKILL myscriptUse SIGKILL only after a plain killall has failed. A process killed this way cannot flush buffers or remove its temporary files, which is why trying SIGTERM first is the safer habit. For a longer discussion of signals and when to use each, see our guide on how to kill a process in Linux
.
Signals are also useful for more than termination. For example, BIND reloads its configuration when the named process receives SIGHUP:
sudo killall -s HUP namedTo list all signal names that killall understands, use -l:
killall -lHUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT
CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH POLL PWR SYSMatching Names Case-Insensitively
Process name matching is case-sensitive by default. If you are not sure about the capitalization, add -I:
killall -I "teamviewer"This matches TeamViewer, teamviewer, and any other case variant of the name.
Matching with Regular Expressions
The -r option interprets the name as an extended regular expression, so you can signal several related processes at once:
killall -r '^chrom.*'The ^ anchor limits the match to names that begin with chrom, such as chrome and chromium. Quote the pattern so the shell does not interpret special characters before killall sees them.
Killing Processes Owned by a User
The -u option restricts matches to processes owned by a specific user:
killall -u sarah nodeThis terminates only the node processes running under the sarah account, leaving other users’ node processes alone.
If you pass -u without a process name, killall signals every process the user owns:
sudo killall -u sarahBe careful with this form. It terminates the user’s entire session, including their shell and any editors with unsaved work. Combine it with -i when you want to review each process first.
Confirming Each Kill Interactively
The -i option asks for confirmation before signalling each matching process:
killall -i nodeKill node(2211) ? (y/N)
Kill node(2384) ? (y/N)Answer y to signal a process or press Enter to skip it. Interactive mode is a good safety net when a name is common enough to match processes you did not have in mind.
Filtering by Process Age
The -o (older) and -y (younger) options filter matches by how long a process has been running. The time is a whole number followed by a unit: s for seconds, m for minutes, h for hours, d for days, w for weeks, M for months, and y for years.
To kill myscript processes that have been running for more than an hour:
killall -o 1h myscriptTo kill only instances started within the last ten minutes:
killall -y 10m myscriptThe age filters are handy for cleaning up stuck workers or runaway cron jobs while leaving fresh, healthy instances running.
Waiting for Processes to Die
By default, killall sends the signal and returns immediately. The -w option makes it wait until all signalled processes have actually terminated:
killall -w myscript && echo "all stopped"This is useful in scripts that must not continue until a service is fully down. The wait can continue forever if the signal is ignored, has no effect, or leaves the process in a zombie state.
To put a ten-second limit on the wait, run killall through the timeout command
:
timeout 10s killall -w myscriptIf the limit expires, timeout stops the killall command, but the target process may still be running. Inspect it with pgrep before deciding whether to send SIGKILL. A process that remains in a zombie state can also cause killall -w to keep waiting.
killall vs kill vs pkill
All three commands send signals; they differ in how you select the target processes:
killtargets a specific PID. It is the most precise option, but you have to look the PID up first.killalltargets an exact process name and signals every instance of it.pkilltargets a name pattern, sopkill firematchesfirefox. It can also match against the full command line with-f.
The exact-name behavior of killall makes it more predictable than pkill for everyday use: killall node cannot accidentally match node_exporter. Linux limits the process name stored in /proc/PID/stat to 15 characters. For longer names, killall may have to fall back to those first 15 characters when the full name is unavailable. Add -e to skip a long-name match that cannot be verified exactly.
Common Options
-s SIGNAL- Send the given signal instead ofSIGTERM. Also accepts the-SIGNALand numeric forms.-l- List known signal names.-v- Report each signal that was successfully sent.-q- Do not complain when no process matched.-I- Match process names case-insensitively.-r- Interpret the name as an extended regular expression.-e- Require an exact match for names longer than 15 characters.-u USER- Match only processes owned by the given user.-i- Ask for confirmation before signalling each process.-o TIME- Match only processes older than the given age.-y TIME- Match only processes younger than the given age.-w- Wait until all signalled processes have died.
Quick Reference
For a printable quick reference, see the kill cheatsheet .
| Task | Command |
|---|---|
| Terminate all processes with a name | killall firefox |
| Force kill after a failed terminate | killall -9 firefox |
| Reload BIND’s configuration | sudo killall -s HUP named |
| Ignore name capitalization | killall -I teamviewer |
| Match names by regex | killall -r '^chrom.*' |
| Kill a user’s instances of a program | killall -u sarah node |
| Kill all of a user’s processes | sudo killall -u sarah |
| Confirm each kill | killall -i node |
| Kill instances older than one hour | killall -o 1h myscript |
| Wait until processes exit | killall -w myscript |
| List signal names | killall -l |
Troubleshooting
killall: no process foundkillall requires the process name to match exactly unless you use -r or -I. Run pgrep -a pattern or ps -e -o pid,comm to check the reported name, capitalization, and command line before trying again.
Operation not permitted
You can signal your own processes, but another user’s process normally requires root privileges. Verify the exact target first, then rerun the command with sudo only when needed.
killall -w does not return
The process may have ignored the signal, stayed in a zombie state, or been replaced by a new process with the same PID while killall was checking it. Stop waiting with Ctrl+C, inspect the target with pgrep -a -x NAME, and use SIGKILL only if the process is still running and cannot shut down cleanly.
Conclusion
killall terminates every instance of a program in one command, with filters for user, age, and case when the name alone is too broad. When you need pattern matching instead of exact names, reach for pkill
, and when you need to inspect processes before killing them, start with pgrep
.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page