Linux Terminal Command: killall
The killall command is an essential tool in Process & Job Control. In this tutorial, we will explore what killall does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.
Concept & Explanation
The killall command sends a termination signal to all active processes running a specific command name.
Common Options & Syntax
killall [options] [arguments]
Here are the most common flags used with killall:
- Simple Usage: Basic default commands.
- Detailed View: Shows diagnostic information.
- Advanced Actions: Can chain parameters for scripting.
1. Interactive Example (Simple)
Here is how most people run the command:
# Example
killall firefox
What it does: Closes all running instances of Firefox.
2. Power-User Example (Advanced)
For scripting and advanced diagnostics, use this configuration:
# Advanced
killall -w -I -9 nginx
What it does: Forcefully terminates all Nginx processes, ignores case (-I), and waits (-w) until all instances are fully stopped.
⚙️ Warning & Common Pitfalls
[!WARNING] On some Unix systems (like Solaris),
killallterminates all processes on the system, rebooting the machine. Check command availability before using it on non-Linux platforms.
🔗 Related Commands
Here are some related posts on cli_tty1 you might want to check out: