How to Kill Hanged Program From Command Prompt in Windows 11/10

Task Manager is the right place to kill a program that hangs or turns into not responding. While you can make them auto-kill, sometimes it’s not preferable, and sometimes even the task manager hangs. Here is a nifty trick that lets you kill a hanged program from the command prompt in Windows 11/10

Windows has two programs—Taskkill and Tasklist. While the former can kill running programs, the following lists all the running applications. You need both as taskkill needs a PID or Process ID of that program, which you can find through the tasklist command. So let’s give it a run. That’s is how Task List looks like when you run tasklist.exe

Tasklist lists running processes on Terminal

How to Kill Hanged Program From Command Prompt in Windows 11/10

  • Open the Run prompt using Win + R and type cmd.
  • First, figure out the PID of the program you want to kill using tasklist.exe.
  • Note the PID, and then type taskkill /PID and hit enter.
  • It will terminate the program.

Taskkill example commands

How to use Taskkill with different options

TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

Description: This command line tool can end one or more processes. Processes can be killed using the process id or image name with Taskkill.

Parameter List:

  • /F Specifies to terminate the process(es) forcefully.
  • /PID process id Specifies the PID of the process that has to be terminated.
  • /IM image name Specifies the image name of the process that has to be terminated. Wildcard ‘*’ can be used to specify all image names.
  • /T Tree kill: ends the specified process and any child processes which were started by it.

You need to terminate all the processes if an application has sub-applications or a child program. Get the PID from Task List and then kill it forcefully using the /F option or /T for the child process.


  1. Hi,
    In the Task Manager under application tab, the list of task needs to be displayed in command line. The command tasklist displays the process. But I require only the application tab details, also need the Image name under Process Tab.

    Is there a command to display the task name under application tab in command line


Please enter your comment!
Please enter your name here