How to List and Stop Windows Processes in CMD
Use tasklist to find a running Windows process, then stop it safely with taskkill by PID or image name. Includes filters and force-termination warnings.
Start Interactive LessonWhen an application is frozen, you can diagnose it from Command Prompt without opening Task Manager. Use tasklist to inspect running processes, identify the process ID (PID), and use taskkill to stop only the process you intend to close. Microsoft’s references are tasklist and taskkill. The process-management lesson lets you practise the same workflow in a safe browser terminal.
Find a running process and inspect its details
1. List processes before you stop anything
Start with a plain list:
tasklist
Each row includes an image name, PID, session name, session number, and memory use. The PID is the safest identifier for a one-off stop because two programs can have similar names.
To narrow a long list, filter by image name:
tasklist /fi "IMAGENAME eq notepad.exe"
The filter is case-insensitive, but the .exe suffix matters. You can also request verbose output or machine-friendly CSV:
tasklist /v /fo csv
If the command returns no rows, the process is not running under that name, or it belongs to another session. Check the spelling and run tasklist again instead of guessing a PID.
2. Stop one process by PID
Once you have confirmed the PID, stop that exact process:
taskkill /pid 1234
Replace 1234 with the PID you actually found. Without /f, Windows gives the process a chance to close cleanly. A program may show a save prompt or refuse the request; that is useful information when unsaved work matters.
Stop by image name when every matching instance is intended
For a known executable, use /im:
taskkill /im notepad.exe
This can affect more than one instance. If the process owns child processes, add /t only when you intend to stop the whole process tree:
taskkill /pid 1234 /t
Force termination is a last resort
/f ends the process immediately and can discard unsaved data:
taskkill /pid 1234 /f
Use it for a genuinely unresponsive process after you have recorded the PID. Do not use a wildcard image name or a broad filter on a production machine. System services and protected processes may require an elevated Command Prompt, and forcing them can destabilise Windows.
Choose how precisely taskkill should target the process
A safe diagnosis loop
- Run
tasklistand identify the image name and PID. - Filter again to confirm the target is still present.
- Try
taskkill /pid <PID>without/f. - Use
/fonly if the process remains stuck and losing unsaved work is acceptable. - Run
tasklistonce more to verify that the intended process disappeared.
The command does not bypass permissions. If Windows reports “Access is denied,” open an elevated prompt only when you are authorised to manage that process. For a beginner-friendly walkthrough, continue with the interactive process-management lesson; for identity and group checks, see whoami.
Knowledge Check
1 / 3Which command lists running processes?
References
These documentation links provide authoritative details for the commands used in this article.
Up Next
Add, remove, and manage user accounts with net user.