Redex Redex - 3 months ago 10
Linux Question

How does pkill mask work?

If I have process named

and process named
running and I execute command
pkill raspvid
, does it kill both processes or only process which is named raspvid?

If pkill kills both processes is there any linux-command to do the perfect match?


pkill kills all processes that command pgrep lists with the same parameters. In your case it sends SIGTERM signal to both processes. The following command kills the exactly matching pattern only:

 pkill -x raspivid