2016-01-01 03:48:36 +00:00
|
|
|
# pkill
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Signal process by name.
|
|
|
|
> Mostly used for stopping processes.
|
2021-03-25 00:01:07 +00:00
|
|
|
> More information: <https://www.man7.org/linux/man-pages/man1/pkill.1.html>.
|
2016-01-01 03:48:36 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Kill all processes which match:
|
2016-01-01 03:48:36 +00:00
|
|
|
|
2021-03-25 00:01:07 +00:00
|
|
|
`pkill -9 "{{process_name}}"`
|
2016-01-01 03:48:36 +00:00
|
|
|
|
2016-01-13 22:03:35 +00:00
|
|
|
- Kill all processes which match their full command instead of just the process name:
|
|
|
|
|
2021-03-25 00:01:07 +00:00
|
|
|
`pkill -9 --full "{{command_name}}"`
|
2016-01-13 22:03:35 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Send SIGUSR1 signal to processes which match:
|
2016-01-01 03:48:36 +00:00
|
|
|
|
2021-03-25 00:01:07 +00:00
|
|
|
`pkill -USR1 "{{process_name}}"`
|
|
|
|
|
|
|
|
- Kill the main `firefox` process to close the browser:
|
|
|
|
|
|
|
|
`pkill --oldest "{{firefox}}"`
|