•Arnošt Havelka
Process Mgmt
View and kill running tasks with tasklist and taskkill.
Start Interactive LessonProcess Management
Just like Task Manager, but for the CLI. tasklist sees what's running, and taskkill stops it.
1. Tasklist
Displays a list of currently running processes on the local computer or on a remote computer.
Usage:tasklist
[/fi "filter"]
[/v]
/fi
Displays a set of tasks that match a given criteria.
/v
Displays verbose task information.
2. Taskkill
Ends one or more tasks or processes. Use with caution!
Usage:taskkill
[/im filename]
[/pid processid]
[/f]
/im
Specifies the image name of the process to terminate.
/pid
Specifies the Process ID of the process to terminate.
/f
Forcefully terminates the process (ignores warnings).
Real-World Scenario: Killing Unresponsive Apps
Sometimes an app hangs and you can't click "Close".
- Find the process ID (PID)
- Kill it.
Command Prompt
C:\Users\User>tasklist | find "notepad"
Command Prompt
C:\Users\User>taskkill /pid 5420 /f
Knowledge Check
1 / 3Which command LISTS running processes?