Stop a program using taskkill command

Windows XP and Vista provide a command line tools taskkill and tasklist to list and kill any running process. Using this, you can kill a process using image path or pid etc. This article shows you how you can use this tool.

  1. Open command prompt from Start Menu → Run, type cmd and press Enter.
  2. Type tasklist and press Enter to list all the running processes. You would see a list of all processes running on your computer along with their PID (process ID) and memory usage as shown in this picture :

  3. Note down the PID of a process you want to terminate (kill). For example, on my computer opera.exe has an PID of 2720.

  4. Type taskkill /f /pid 2720 to kill opera.exe. The /f switch forcefully terminates the running process. You specify the PID of the process to be terminated by using the /pid switch followed by the PID of the target process.

If you already know the image file name of the process being run then you do not have to find out the PID necessarily. For example, in case of the Opera browser we know the process name is opera.exe. Just type taskkil /f /im opera.exe to terminate the process.