tldr/pages/common/pkill.md

26 lines
588 B
Markdown
Raw Normal View History

2016-01-01 03:48:36 +00:00
# pkill
> Signal process by name.
> Mostly used for stopping processes.
> More information: <https://www.man7.org/linux/man-pages/man1/pkill.1.html>.
2016-01-01 03:48:36 +00:00
- Kill all processes which match:
2016-01-01 03:48:36 +00:00
`pkill "{{process_name}}"`
2016-01-01 03:48:36 +00:00
- Kill all processes which match their full command instead of just the process name:
`pkill -f "{{command_name}}"`
- Force kill matching processes (can't be blocked):
`pkill -9 "{{process_name}}"`
- Send SIGUSR1 signal to processes which match:
2016-01-01 03:48:36 +00:00
`pkill -USR1 "{{process_name}}"`
- Kill the main `firefox` process to close the browser:
`pkill --oldest "{{firefox}}"`