If you want to stop, terminate, or kill a process using Command Line on Windows 11/10 computer, here is how you can do it. Instead of using Task Manager, you can use Command Prompt, Windows PowerShell, and Terminal on Windows 11/10 PC to stop any system process.
In the case of multiple processes taking a lot of CPU resources, Task Manager is cumbersome to use. So, in this post, we will learn how to kill one or multiple processes using the Command Prompt or PowerShell.
Kill a Process using Command Line
To kill a process using the Command Line, follow these methods:
- Using Command Prompt
- Using PowerShell
- Using Terminal
To learn more about these methods, continue reading.
1] Using Command Prompt
The functions of Task Manager can be achieved using command-line based tools— Tasklist and Taskkill. To kill, it is a two-step process.
- First, we need to find the Process ID using Tasklist,
- Second, we kill the program using Taskskill.
Open Command Prompt with admin privileges by typing cmd in the Run prompt (Win + R) followed by pressing Shift + Enter.
To view the processes, type the following and hit Enter:
Tasklist /fo table
Note the process ID listed under the Process ID column.
You can also kill a program using the exact name.
To kill a process by its name, type the command:
Taskkill /IM "process name" /F
So for Chrome, the program will have the name chrome.exe.
Type and press Enter the following to kill Chrome.
Taskkill /IM chrome.exe /F
The /F switch is used to kill the process forcefully.
To kill a process by its PID, type the command:
Taskkill /F /PID pid_number
Now to kill multiple processes simultaneously, run the above command with the PIDs of all the processes followed by spaces.
Taskkill /PID 2536 /PID 3316 /F
For each process, you will have to add /PID option, and then execute it.
That said, here is one thing you should know. These days an application spans itself into smaller programs, and each of them has a different process ID. Taking an example of Chrome, it has a PID for the extension, one for subroutines, and so on. Finding the primary process i.e., parent program ID is not easy, and so if you want to kill an application, it is best to use process namer to kill it.
2] Kill process using PowerShell
To see the list of running processes, execute the following command in an elevated PowerShell prompt:
Get-Process
To kill a process using its name, execute the following command:
Stop-Process -Name "ProcessName" -Force
To kill a process using its PID, execute the following command:
Stop-Process -ID PID -Force
3] Using Terminal
If you want to use the Terminal to kill or stop a process, you need to press Win+X and select the Terminal (Admin) option. Click the Yes button in the UAC prompt.
Now there are two ways. If you want to use the Command Prompt instance, you can follow the same command as mentioned above. That said, you need to use this command:
Taskkill /IM "process name" /F
On the other hand, if you want to use the PowerShell instance, you can execute this command:
Stop-Process -Name "ProcessName" -Force
Note: You can use the PID method in Terminal as well.
If Task Manager is not available, there are many alternatives. Programs such as Process Explorer from Microsoft are excellent add-ons that offer more details about the process and even allow you to kill multiple applications in one go. However, Taskview, Taskkill, or Stop-Process can also be used to kill applications on remote computers, which is not possible for all third-party programs.
I hope the post was easy to follow.
Read: How to kill a Not Responding process
How do I kill a process on Windows 11?
There are multiple ways to kill a process on Windows 11. You can open the Task Manager, find the process, and click the End task button. Alternatively, you can use the Taskkill /IM “process name” /F command to stop any process using Command Prompt. Apart from that, you can also use Taskkill /F /PID pid_number command to get the same thing done.
How to kill a process in Windows using cmd?
To kill a process in Windows using cmd, open the Command Prompt with administrator permission and enter this command to find all the processes: Tasklist /fo table. Then, find the process name and enter this command: Taskkill /IM “process name” /F. For your information, the /F parameter helps you stop the process forcefully.
Read next: How to force close a Program which Task Manager cannot terminate?