I perform the following on Win7 32-Bit in the command prompt:
netstat -ano | findstr 8080it returns with:
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1896how might I kill this process?
6 Answers
In windows you can use taskkill /pid 1896
See the reference at
4If you are using Git BASH then you can try with below command
taskkill //pid 1896Not the extra back slash here, otherwise it will throw error of invalid argument.
I hope it helps!!
I'm using Josep's command above in a script because we have a problem where MS werfault.exe (Dr Watson) steals port 8080 from our proxy server.
It's a great command, but the find "8080" will also find a port of e.g 18080 or a process id that has 8080 in it. Subsequently the wrong task could be killed.
Can be improved by changing the find string to ":8080 " (note the trailing space)
Thanks
1Open command prompt and execute:
for /f "tokens=5" %a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do taskkill /f /pid %aIf you want to do it in a .bat, replace %a for %%a
For me following works on windows 10, so you guys can also try !!
First of all, find all the process which are running ona port.
For that use following command in cmd:
netstat -ano | findstr <port_number>After finding all the process running on a port, just use below command to terminate the process you want to terminate :
taskkill /F /pid 1060810608 is the process which is going to be terminated.
1in linux u can use for kill process permanently
kill -9 PIDex.
I am going to kill httpd process and httpd pid is 7452 ok.
then
#kill -9 7452 But make sure u can use this process only for linux .
1