Kill Tasks from Command Prompt




Recently, my friend’s computer was attacked by a virus and his task manager stopped working. The Task Manager was opening, but it wasn’t showing any processes running at all. So to fixed that, I went through many websites and looked for number of Task Manager alternatives.

While searching, I came across a very interesting Windows XP/Command Prpmpt trick (don’t remember the site). You could actually view and kill processes from Command Prompt if your Windows Task Manager stops working for some reason.

Kill Tasks in Command Prompt

To kill the tasks from the Command Prompt, open Command Prompt by navigating to Start > All Programs > Accessories and select Command Prompt. Alternatively Command Prompt can be opened by typing cmd in Run. After you open Command Prompt, type “tasklist” (without the quotes) for a list of all the running processes. A list will be shown, and following every process name you could see a number, something like 1288. This is the PID number. You will need this to kill the task.

After looking for the process to kill, note down it’s PID number (process code) and type “tskill PID Number” without the quotes in Command Prompt. Of course, PID number should be replaced by the actual code. So the command becomes something like this: tskill 1288

That’s it. The process will be killed!

I hope you enjoyed this trick and thanks for reading this.

Was this post helpful? Follow us on Twitter (@SizzledCore) or become our Facebook fan for all the latest updates!


  • http://www.helloashok.com/ Ashok Arora

    Nice tip, I also encountered similar problem few days ago, but my command prompt was also disabled

  • http://www.techiesden.com Vaibhav

    Cant this be a case because of Viruses and trojans??

  • http://www.sizzledcore.com Haris

    Yeah, the most common reason for such problems is viruses and trojans. And the latest virus that is nowdays circulating an many PCs is the New Folder virus. It disables your Task Manager, and you can’t even stop its process.

  • http://www.whoismadhur.com Madhur Kapoor

    cool tip buddy . never knew this

  • http://www.sizzledcore.com Haris

    @Madhur: I’m glad you liked it :)

  • http://www.shaunlow.com shaun

    Sweet thanks for the info.

  • http://nuvvenuvve.blogspot.com kishore

    That is a nice trick in Windows… Does it work in Vista too

  • http://www.techiesden.com Vaibhav

    Informative one, will be useful some day :)

  • http://123123.com 123

    this does not work in vista, does anone know a vista way of doing this?

  • Anil Veluri

    Its Good. But do you know how to hard kill all the tasks running on a Server Computer which is processing several requests from different client computers.

  • Sarath Sasi

    ‘tskill” command is not working in Vista?

    Try to disable User account control(UAC) from the control panel .Then restart computer.
    Then try agin. It will work

  • Dylan

    I have a virus right now that is running from a windows schedueled task. I can’t get to any program other than Windows Task Manager, which is no help, and once the cmd prompt is up from Task Manager, it doesn’t open under my account so taskkill is no use what so ever. I am about to wipe my drive. Maybe, still trying, RunAlyzer is some help. The main problem is that once i kill all, roughly, thirty processes from the virus, they all come back. I can’t get rid of them. I tried killing them all from RunAlyzer, but the schedueled task just brought them all back. I need help fast.

  • Jo

    I have disabled UAC long time ago, and it says:
    ‘tskill’ is not recognized as an internal or external command, operable program or batch file.

    Is there a way to extract the PID of a given program ?

  • Jo

    Nevermind I got it:

    Use TASKKILL and stuff :)

  • Reagan

    On my HP G61 with Windows 7, I tried all the steps and it failed to recognize “tskill”

  • ldhacker

    To do this in windows 7 you type “taskkill PID Number”

  • Newnewgen

    Hi,
    In the Task Manager under application tab, the list of task needs to be displayed in command line. The command tasklist displays the process. But I require only the application tab details, also need the Image name under Process Tab.

    Is there a command to display the task name under application tab in command line

  • Rgrant222

    Actually, the syntax is:
    taskkill /pid #
    so to kill process 5724, for example, you would type:
    taskkill /pid 5724

    Also, you can always read the help by typing:
    taskkill /?