Kill a Process Using Command Prompt

Here is how you can kill a process in Windows using a Command-Line Interface

Operating systems started out as command-line interfaces, allowing a user to only interact with a computer using text. Just text. White text on a black screen. The modern operating system is an evolution and is light years ahead, in terms of usability as well as design.

However,  text-based computer-interaction still offers some advantages that a GUI-based operating system simply can’t match. From automated batch scripts to a wealth of rich commands, the speed and performance offered by a text-based interface are simply too good for professional users.

We recently covered a guide on how you can kill a process in Windows using the Task Manager, which is perhaps one of the most popular Windows programs that everyone needs to know how to use. Apps crashing or hanging is a common occurrence in Windows and sometimes, killing or force stopping them is pretty much the only way to get rid of them and stop them from hogging down your PC’s resources.

Here, we will list down the steps you need to do to kill a process using the Command Prompt, the preferred Command-Line Interface for many professional Windows users. Here is how you can do it,

Kill a Process from the Windows Command Prompt

  1. Open Command Prompt in an elevated mode. You can simply search for cmd, right-click on it and click on Run as administrator. For more detail on running a Windows program in elevated mode, please visit our guide over here or here.
  2. Enter the following command and press Enter,
    tasklist
    
  3. It will list down all the names of all the processes currently running on your PC along with their Process ID, Session Type, Session Number, and Memory Usage. Note down the Name or Process ID of the process you want to kill. You can also use the find command to search for a certain process (Replace the chrome with the program you want to search for ),
    tasklist | find /i "note"

  4. You can kill a process by using its name or process ID by using the following commands,
    • taskkill /F /PID pid_numbere.g. 
      
      taskkill /F /PID 10164
    • taskkill /IM "program name" /F
      
      e.g taskkill /IM "notepad.exe" /F

That’s it. If you have currently entered the program id/name, it should successfully terminate that program. However, do keep in mind that using the name to kill the process would kill all the processes using that program name. It is useful when you want to terminate the whole program instead of just a single instance of the program