Linux killall Command
The Linux killall command is used to kill a process, unlike the kill command which kills processes by their PID, killall kills all processes with a specified name.
The kill command requires the use of ps to identify the PID of the process to be killed, while killall operates directly on the process name, making it more convenient.
Syntax
killall [options] name
Parameter Description:
name: Process name
-e | --exact: The process name must match exactly
-I | --ignore-case: Ignore case
-g | --process-group: Terminate the process group
-i | --interactive: Ask for confirmation before termination
-l | --list: List all signal names
-q | --quiet: Do not output any message if no processes were terminated
-r | --regexp: Interpret the process name as an extended regular expression
-s | --signal: Send the specified signal
-u | --user: Terminate processes owned by a specified user
-v | --verbose: Show detailed execution process
-w | --wait: Wait for all processes to terminate
-V | --version: Display version information
--help: Display help information
Example
# killall -9 php-fpm // Terminate all php-fpm processes