On a debian Linux server I tried to run a python script with in the python script the following line of code:
subprocess.call('pkill Chrome')
but this caused the following error
FileNotFoundError: [Errno 2] No such file or directory: 'pkill Chrome'
Expecting that it was the command that failed I tried a few different things like writing sudo
before the pkill and writing chrome
in stead of Chrome
but nothing worked. Any ideas how I can kill all chrome instances? Thanks in advance!
Btw, I also tried the same line but with the killall chrome
command resulting in a similar error.