killall
Processes and system
Usage
killall [-SIGNAL] <name>Kills processes by name rather than by PID; the name must match the executable exactly, so `killall chrome` misses a process called "Google Chrome".
Common flags
| Flag | Meaning |
|---|---|
| -9 | Force, with no chance for the process to clean up. |
| -i | Ask for confirmation before each kill (Linux). |
| -u <user> | Only the processes of that user with this name. |
| -e | Require an exact match for names longer than 15 characters (Linux). |
| -w | Wait until the processes are really gone (Linux). |
| -m <pattern> | Treat the argument as a regular expression (macOS/BSD). |
Examples
killall nodeStop every process whose executable is named node.
killall -9 DockForce-restart the macOS Dock, which relaunches itself.
What is running and what is eating the machine. Identifying it comes before killing it.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does killall do?
Kills processes by name rather than by PID; the name must match the executable exactly, so `killall chrome` misses a process called "Google Chrome".
Q. How do I type it?
killall [-SIGNAL] <name> — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
6 are listed here; the full set is in man killall. This command sits under Processes and system.
Related commands
man page: man killall