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.
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).
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.
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
If you like our post, please help to share it with others.
Great article..
This helped me.
I was facing this issue to close all open processes at once.. Finally got the answer.. Nive article.