Taskkill /PID not working in GitBash

Min picture Min · Jan 24, 2016 · Viewed 20k times · Source

I'm trying to kill a process on GitBash on Windows10 using the taskkill command. However, I get the following error:

$ taskkill /pid 13588
ERROR: Invalid argument/option - 'C:/Program Files/Git/pid'.
Type "TASKKILL /?" for usage.

it works fine on cmd. Can anyone help?

Answer

gollum picture gollum · Jan 24, 2016

You have to use double slashes in this case:

taskkill //PID 13588

This is documented here: http://www.mingw.org/wiki/Posix_path_conversion
Look at the examples on this page, especially the //foobar example.