CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

How to kill Windows process from command prompt?

Sometimes suddenly your system will run slow. Usually, when the system runs slow, we will open the Task Manager window and figure out the task which is taking more CPU & Memory usage and kill that particular task (if the running task is NOT so important) through the Task Manager window. When the system is too slow, some times Task Manager window also will not respond quickly.

Another alternative to killing the process which is consuming more CPU & Memory is through the command prompt window. Windows Operating system provides some commands to kill a process from the command prompt window.

The following steps will explain, how to figure out and kill a process that is taking more Memory usage.

Step (1). Open the command prompt window.

Step (2). Before running a command to kill a process, we need to figure it out what process is taking more Memory & CPU usage. It is easy to figure out this through Task Manager; but when the system is too slow, Task Manager also will not respond quickly. So we need to figure this out through the command in the command prompt window only. Run the following command to display the currently running tasks.

Tasklist.exe command is useful to display the currently running processes from the command prompt. See “Windows : Display running processes from command prompt (using TASKLIST.EXE)” for the usage.

tasklist

Step (3). Figure out the process which is taking more memory by looking at the “Mem Usage” column in the task list. Once you find out the process, note down its PID. This will be helpful while killing the process.

Step (4). Run the following command to kill the process.

taskkill /PID <here provide the PID of the process you captured from previous step>

Step (5). If you want to forcibly kill the process use the following command.

taskkill /F /PID <here provide the PID of the process you captured from previous step>

Once the process is removed from memory, your system will speed up and will quickly respond to your command.

If you want to know more about these commands; type the following commands at the command prompt.

tasklist /?

taskkill /?

You have to be careful while killing the processes using the taskkill command. Otherwise, you will lose any unsaved data.

by Code Steps

How to kill Windows process from command prompt?

One thought on “How to kill Windows process from command prompt?

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top