Monday 23 April 2012

How to kill a process in Windows ?


For killing any running process in Linux we use "kill -9 PID" . The PID or process id we can know from "ps" command in Linux.

But for windows it is slightly different:

For windows there can be two ways to kill the process :


1) Go to task manager -> select the process name and end process tree.

this works fine when you know the process name which is running in task manager.
For some process it is difficult to know exactly the process name so for that another method can be used.

2) Use command "netstat -ano" , get PID for the port no, on which your process is running, and give command "taskkill /f /PID XXXX  to kill the process.