pkill
Send signals to processes based on name pattern and other attributes.
Synopsis
pkill [OPTION]... PATTERN
Examples
pkill -f 'node server.js'
pkill -9 -u nobody
pkill -x sshd
pkill -t pts/2
Common options
| Flag | Description |
|---|---|
| -9 | Send SIGKILL |
| -f | Match against full command line |
| -u | Match by effective user |
| -x | Exact match only |
| -t | Match by terminal |
About pkill
The `pkill` command send signals to processes based on name pattern and other attributes. Process management commands let you monitor, control, and schedule running processes.
Linux is a multitasking operating system, and understanding how to list processes, send signals, adjust priorities, and manage background jobs is vital for system administration and debugging performance issues. The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man pkill`).
The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Process Management Commands
Other commands in the Process Management category