killall — Terminate processes by name
Linux / Service and process management / killall.html
Sends a signal to every process whose name matches.
Basic Information
| Command Name | killall |
|---|---|
| One-line Introduction | Sends a signal to every process whose name matches. |
| Provided by | psmisc package |
| Official Documentation | https://man7.org/linux/man-pages/man1/killall.1.html |
| Supported Operating Systems | Linux |
| Installation Status | Package required (apt install psmisc) |
| Category | Linux service and process management (tags: Process and resource management (tags: process, signal, terminate)) |
What is this command?
killall targets processes by name instead of PID.
The default signal is TERM; numeric or named signals request forced termination or reload.
What problems does it solve?
- Clean up every instance of the same program at once.
- Send HUP to reload configuration.
- Remove leftover instances in one step.
- Keep cleanup steps in scripts short.
Key features
Graceful termination
Without a signal it sends TERM and asks the process to exit.
- When to use: When a graceful stop is intended
- What you get: Process exits after cleanup
- Limitations: Processes ignoring TERM stay alive
Choosing a signal
Pass a signal name or number to change the effect.
- When to use: For reloads or forced stops
- What you get: HUP reloads, KILL stops immediately
- Limitations: KILL skips cleanup
Checking targets
Use -i for interactive confirmation or -w to wait for exit.
- When to use: When accidental kills are a risk
- What you get: Confirmation or wait-for-exit
- Limitations: Overlapping names may match unintended targets
Installation and usage
Check whether it is installed
killall -V
apt install psmisc # Debian/Ubuntu dnf install psmisc # Fedora/RHEL
Real-world examples
Graceful stop
Stop all nginx processes.
# Ask all nginx processes to exit
killall nginx
Reload
Send HUP so the process reloads.
# Reload configuration without stopping
killall -HUP nginx
Confirm before killing
Ask before each kill.
# Ask for confirmation before each match
killall -i nginx