Home / How-to Guides / How to kill process from Command Line in Windows

How to kill process from Command Line in Windows

Killing process or task from the task manager is quite simple. However, it becomes tedious when you want to kill the same process running multiple times. We already know that we can kill the process one at a time using Task Manager. 

However, The command prompt gives you much more control and the ability to end single or many processes at once. 

I often use the command line whenever I want to kill any task on my system. Because sometimes, applications do not respond whenever the system is low in its resources or takes much processing time. In such a case, you may need to kill the task/process from Task Manager. 

But if you have the same application with multiple processes, then in that case, you may need to kill each process manually. For example, when you open numerous Chrome browsers’ Window/Tabs, you will see multiple processes running in Task Manager. Therefore, with the help of the command line, we can easily kill the task/process quickly and easily.

Whenever you open any application, it will have processes running in the background. Each process will have a unique PID Number and process name (also called an Image Name). 

Check the below steps that explain how you can kill the process either using process name(Image Name) or using PID Number for a particular process.

Let’s find the Process Name(Image Name) or PID:

First, you need to find the process name (Image Name) or PID Number for which you want to kill the process from the command line. You can get this detail from Task Manager or use the below command to list all processes.

Open the Command Prompt and type the below command, and press Enter

tasklist

Follow Below Steps to Kill Process from Command Line:

To Kill process using Image Name:

Step 1: Open Command Prompt in Administrator mode. Press Window Key + R key, type “cmd” in the Run Dialog box, and press Ctrl+Shift+Enter to run the command as an administrator.

command prompt Administrator

Step 2: Type the below command in the command prompt and press Enter. 

It will match the process by its name and kill all associated processes.

taskkill /F /IM ImageName

/F parameter will kill the process forcefully without asking for user confirmation.
/IM parameter represents the image name (process name).

kill process by name

To Kill process using PID:

Step 1: Open Command Prompt in Administrator mode. Press Window Key + R key, type “cmd” in the Run Dialog box, and press Ctrl+Shift+Enter to run the command as an administrator.

command prompt Administrator

Step 2: Type the below command in the command prompt and press Enter.

Taskkill /F /PID 39916

/F parameter will kill the process forcefully without asking for user confirmation.
/PID parameter is used for the PID of the process to terminate

kill process by PID

If you like our post, please help to share it with others.

About Roshan Karkera

Roshan Karkera a.k.a. k.roshan. Blogger by passion and software engineer by profession. He believes in sharing knowledge, which made him to start his own blog. He is very much keen & passionate about new technology & Science. If you'd like to connect with him, follow at Google plus or Twitter.

2 comments

  1. Great article..
    This helped me.

  2. I was facing this issue to close all open processes at once.. Finally got the answer.. Nive article.

Leave a Reply

Your email address will not be published.