DOS Tasklist and Taskkill Commands
By Stephen Bucaro
Today, you usually interface with the Windows Operating System through it's graphical user interface (GUI).
However, the first PCs didn't use the Windows Operating System, they used the Disk Operating System (DOS).
DOS has a text interface where you performs tasks and configures the system by typing text commands.
The DOS command line interface is still available in Windows 10, and is still used regularly by the most
skilled system administrators. A system administrator might have a desktop shortcut to the DOS command line
interpreter at C:\Windows\System32\cmd.exe.
The Windows operating system is actually just a bunch of co-operating programs called tasks or processes.
A process can be an application with a user interface, a service that works in the background without a
user interface, or a helper program module called by an application or service. Using the DOS tasklist
command, we can get a list of processes running on the system.
DOS Tasklist Command
The tasklist command by itself displays a list of all processes running on the system.
Using the /fi switch with the tasklist command allows you to specify the types of process(es)
to include in the query.
To get a list of not responding processes:
tasklist /fi "status eq not responding"
To get a list of processes that are running a specified program:
tasklist /fi "imagename eq executablename"
For example to find processes that are running chrome:
C:\Windows\System32>tasklist /fi "imagename eq chrome.exe"
To get a list of services running in a process using the process id:
tasklist /svc /fi "pid eq processId"
For example to find services running with the program ID 6880:
C:\Windows\System32>tasklist /svc /fi "pid eq 6880"
To get the process running a specific service:
tasklist /fi "services eq serviceName"
For example to find processes running webclient service:
C:\Windows\System32>tasklist /fi "services eq webclient"
DOS Taskkill Command
You can use the taskkill command to kill a process.
To kill a process with a specific name:
taskkill /IM executablename
For example to kill the Firebox Web browser:
C:\Windows\System32>taskkill /IM firefox.exe
To kill a process using the process id:
taskkill /PID processId
For example to kill a process with the program ID 1234:
C:\Windows\System32>taskkill /PID 1234
To kill a process forcibly:
taskkill /F /IM executablename
For example to forcibly kill explorer.exe
C:\Windows\System32>taskkill /F /IM explorer.exe
Any skilled system administrator should find the DOS tasklist and taskkill commands useful.
For a complete list of tasklist and taskkill commands parameter switches, operators and their
possible values, vist:
Microsoft TechNet Library
More Windows Administration Information:
• Use Windows 10 File History Option to Backup Your Personal Files
• Set the User's Profile Information
• What Is Virtualization and What Are the Benefits?
• Script to Print a Directory File List
• Windows Event Logs for Maintaining or Troubleshooting Your PC
• How to Configure the msdos.sys file
• How to Install Hyper-V on Windows Server 2019
• Video Tutorial 1 - The Windows 7 Backup and Restore Utility
• Msconfig - Microsoft's Secret Weapon to Increase Your Computer's Speed
• Computer Technician's Guide to Safety