killall Command
Beginner Process Management man(1)Kill processes by name
👁 10 views
📅 Updated: Mar 15, 2026
SYNTAX
killall [OPTION]... NAME
What Does killall Do?
killall sends a signal to all processes with a given name. Unlike kill which requires a PID, killall targets processes by their command name, making it convenient for stopping all instances of a program.
killall matches the exact process name (the basename of the executable). It supports case-insensitive matching, regex matching, and filtering by user, group, or age.
killall is useful for restarting services, stopping runaway processes, and cleaning up multiple instances. Be cautious on Solaris where killall kills ALL processes — on Linux it only kills matching ones.
killall matches the exact process name (the basename of the executable). It supports case-insensitive matching, regex matching, and filtering by user, group, or age.
killall is useful for restarting services, stopping runaway processes, and cleaning up multiple instances. Be cautious on Solaris where killall kills ALL processes — on Linux it only kills matching ones.
Options & Flags
| Option | Description | Example |
|---|---|---|
| -9 | Send SIGKILL (force kill) | killall -9 firefox |
| -i | Ask for confirmation before each kill | killall -i python3 |
| -I | Case-insensitive name matching | killall -I Firefox |
| -u | Kill only processes owned by user | killall -u john python3 |
| -v | Verbose — report if signal was sent | killall -v nginx |
| -w | Wait for all killed processes to die | killall -w -9 stuck_process |
| -r | Use regex for process name matching | killall -r 'php.*fpm' |
| -o | Kill only processes older than specified time | killall -o 1h zombie_proc |
Practical Examples
#1 Kill all instances by name
Sends SIGTERM to all nginx processes.
$ killall nginx#2 Force kill all instances
Force kills all firefox processes immediately.
$ killall -9 firefox#3 Kill with confirmation
Asks yes/no before killing each matching process.
$ killall -i python3#4 Kill user processes
Terminates all processes owned by user john.
$ killall -u john#5 Kill and wait
Sends SIGTERM and waits until all matching processes have terminated.
$ killall -w myservice#6 Verbose kill
Reports which processes received the signal.
$ killall -v php-fpm
Output:
Killed php-fpm(1234) with signal 15
Tips & Best Practices
Exact name matching: killall matches the exact process name, not command arguments. killall python3 will not match /usr/bin/python3 script.py on some systems. Use pkill for broader matching.
Use -w for scripts: In scripts, use killall -w to block until processes are dead before starting new ones. Prevents race conditions in restart scripts.
Linux vs Solaris: On Linux, killall kills matching processes. On Solaris, killall kills ALL processes! Always verify behavior on non-Linux systems.
Frequently Asked Questions
What is the difference between kill and killall?
kill takes a PID number. killall takes a process name and kills all matching processes. killall is more convenient when you want to stop all instances.
How do I kill all processes of a specific user?
Use killall -u username. This terminates all processes owned by that user. Add -9 for force kill.
Does killall kill all processes on the system?
On Linux, no — it only kills processes matching the name you specify. On Solaris, yes — it kills all processes. The behavior differs between Unix variants.
Related Commands
More Process Management Commands
Master Linux with Professional eBooks
Curated IT eBooks covering Linux, DevOps, Cloud, and more
Browse Books →