Menu
DOS Tasklist and Taskkill Commands

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

DOS tasklist command

C:\Windows\System32>tasklist

The tasklist command by itself displays a list of all processes running on the system.

/fi FilterName

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


Learn more at amazon.com

More Windows Administration Information:
• Make a Shortcut to Create a Restore Point on Windows 10
• Guide To Setting Up Dual Monitors
• How to Reset Windows 7 Password
• Disable Unnecessary Background Apps
• Server Virtualization - What It's All About
• Turn Off Windows XP Service Pack 2 Firewall
• How to Change Process Priorities in Windows Task Manager
• To Protect Your PC Disable the Windows Scripting Host
• Windows Server 2003 Active Directory and Network Infrastructure
• CompTIA A+ Complete Study Guide