English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux pkill Command

Linux Command大全

Linux pkill is used to kill a process, similar to kill The difference is that it will kill all processes with the specified name, similar to killall Command.

The kill command kills the specified process PID, which needs to be used with ps, while pkill directly operates on the process name, which is more convenient.

Syntax

  pkill [options] name

Parameter Description:

  • name: Process name

The options include the following parameters:

  • -o Only send the signal to the smallest (start) process ID found -n Only send the signal to the largest (end) process ID found
  • -P Specify the parent process ID to send the signal
  • -g Specify the process group
  • -t Specify the terminal to start the process

Online Examples

# pkill -9  php-fpm          //Terminate all php-fpm process

Linux Command大全