Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Taskkill /PID not working in GitBash

Tags:

bash

git-bash

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?

like image 273
miara Avatar asked Jan 24 '16 21:01

miara


3 Answers

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.

like image 123
gollum Avatar answered Nov 07 '22 02:11

gollum


Use TSKILL processid

Example:

TSKILL 1234 
like image 28
Alessia Avatar answered Nov 07 '22 01:11

Alessia


To fix this I need to kill another additional program:

taskkill //F //IM "git-bash.exe"
taskkill //F //IM "bash.exe"
like image 5
Lucas Moyano Angelini Avatar answered Nov 07 '22 02:11

Lucas Moyano Angelini