pkill
The command that sends a signal to every process whose name matches a pattern, SIGTERM by default.
A loose pattern can signal processes you did not intend to stop.
In more detail
It is convenient and blunt: a loose pattern can match more processes than you meant. Run pgrep with the same pattern first to see who would be hit.
Example
pkill -TERM sleepRelated terms
- pgrep — The command that prints the process IDs of processes whose name matches a pattern.
- kill — The command that sends a signal to a process or job, SIGTERM by default, despite its name.
- signal — A short notification the kernel delivers to a process, such as please stop or stop now.
Taught in
- Processes, Jobs And Signals — Bash Scripting & Command Line Automation