Linux pkill command
Linux pkill is used to kill a process; unlike kill , it kills all processes with the specified name, similar to killall command.
the kill command, which kills a specified process PID and needs to be used together with ps, pkill operates directly on process names, making it more convenient.
Syntax
pkill [选项] name
Parameter Description:
- name : process name
The options include the following parameters:
- -P Specify the parent process ID to send a signal
- -g Specify the process group
- -t Specify the terminal of the process
Example
# pkill -9 php-fpm //结束所有的 php-fpm 进程
Linux Command Reference