The tasklist
is the Windows command we use to list running processes on a Windows system. Often operates together with taskkill to terminate a running process or processes.
Open a command prompt (CMD or PowerShell), type tasklist
, and press Enter:
tasklist
The following screenshot shows the default output of the tasklist
command. It shows the Image Name (the name of the program that launched the process), process ID (PID), and the Memory Usage of each task.
The list can be long, so you may want to pipe the output to the more
command (press Enter key to scroll through).
tasklist | more
If you want to end a process, use the taskkill command to terminate a running process using its process ID (PID) or image name.
taskkill /pid process-ID
taskkill /im image-name
For example, the following command terminates all instances of the notepad process by its image name.
taskkill /im notepad.exe
The Windows tasklist
command supports three output formats: Table (the default), List, and CSV. To change the output format, use the /fo
option, as shown in the following example:
tasklist /fo list
The following command saves the current task list into a text file in CSV format:
tasklist /fo csv > tasklist.txt
Running Tasklist Command on a Remote Computer
We can use the tasklist
command to list running tasks on a remote computer. Use the /s
and /u
options to specify the IP Address and username of the remote computer, respectively.
tasklist /s 192.168.1.100 /u user1
However, the Firewall must be configured on the remote Windows system to allow the tasklist
command. Click the link below for instructions on how to do it.
How to allow tasklist command from Windows Firewall
Command Options
The tasklist command has multiple options, which you can see by typing tasklist /?
.
Examples
Use the /V
option to display additional information, such as the program’s username and total CPU time:
tasklist /v
Show the list of dll
files used by each process:
tasklist /m
Display the services provided by each process:
tasklist /svc
Using Filters to List Tasks That Match a Given Criteria
Using the /fi
option, you can filter the command output to display the tasks that match the given criteria. The following section presents some examples.
List running processes:
tasklist /fi "status eq running"
List tasks that not responding:
tasklist /fi "status eq not responding"
List the process that has PID of 0:
tasklist /fi "pid eq 0"
List all processes owned by the user user1
:
tasklist /fi "username eq user1"
Display the services are related the svchost
process(es):
tasklist /svc /fi "imagename eq svchost.exe"
Show the processes using more than 10MB of memory:
tasklist /fi "memusage gt 10240"
You can get a list of all filters by running the tasklist /?
command.
You can view the list of currently running processes in the Command Prompt by using the `tasklist` command, which displays all active processes in a simple format.
Here’s the code snippet:
tasklist
Understanding CMD Processes
What Are Processes?
In computing, a process is an instance of a program that is being executed. It includes the program’s code, its current activity, and the resources allocated to it, such as memory and CPU usage. Examples of common processes include system processes critical for operating system functionality and user applications such as web browsers and word processors. Understanding what processes are is essential for managing your system effectively.
Why List Processes?
Being able to list processes using CMD is crucial for various reasons:
- Troubleshooting: When your computer runs slowly or behaves erratically, checking the list of running processes can help identify problematic applications.
- Resource Management: Monitoring which processes are active can aid in optimizing system performance by closing non-essential applications.
- Identifying Rogue Applications: By regularly checking the process list, you can spot unusual applications that could indicate malware or unauthorized software.
Cmd List Drive Letters: A Quick Guide to Your Drives
How to Access CMD
Opening Command Prompt
To begin using CMD, you must first know how to access it. Follow these steps to open the Command Prompt in Windows:
- Using the Start Menu: Click on the Start button and type `cmd` or `Command Prompt` in the search bar. Press Enter to launch it.
- Using Run Dialog: Press Windows + R on your keyboard, type `cmd`, and hit Enter.
- Using Power User Menu: Right-click on the Start button and choose Command Prompt or Windows PowerShell from the menu.
Unlocking Cmd Bitlocker: A Quick Guide
The CMD Command to List Processes
Using the Tasklist Command
The tasklist command is a powerful tool that allows you to view the processes running on your system.
Basic Syntax
To use this command, simply type:
tasklist
Upon executing this command, you will receive a list of currently active processes. The output includes several columns such as Image Name (the name of the executable), PID (Process ID), Session Name, Session#, and Mem Usage (memory usage).
Example Usage
When you run the command:
tasklist
You might see output like this:
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
explorer.exe 1234 Console 1 12,345 K
chrome.exe 5678 Console 1 45,678 K
In this example, you see explorer.exe and chrome.exe as running processes along with their associated PIDs.
Advanced Usage of Tasklist
Filtering Processes
The tasklist command can be enhanced with filters to refine your search based on certain criteria, such as status.
For example, to list only the running processes, you can use:
tasklist /fi "STATUS eq running"
This command filters the processes to display only those that are currently active, allowing you to manage them more effectively.
Exporting Process List
Another useful feature of the tasklist command is the ability to export the process list to a text file for later review or reporting.
To save the current process list to a file, you can execute:
tasklist > process_list.txt
The output file, process_list.txt, will then contain a complete list of currently running processes, making it easy to archive or analyze data later.
Cmd Troubleshooting Made Simple: Quick Fixes Explained
Other CMD Commands for Process Management
Using Get-Process in PowerShell
While CMD provides powerful commands for managing processes, PowerShell offers more flexibility and richer command options.
To list all processes using PowerShell, the command is:
Get-Process
This command gives you a similar overview of running processes, but with more properties available for each process. Comparing the outputs from PowerShell and CMD can help you learn the nuances of each tool.
Using WMIC to List Processes
The WMIC (Windows Management Instrumentation Command-line) tool provides another alternative for listing processes, often favored for more advanced queries.
To obtain a list of processes along with their names and process IDs, you can use:
wmic process get name,processid
This command gives you a simplified output, focusing on the essential attributes of each process, providing clarity when managing processes.
Mastering Cmd in Powershell: A Quick Guide
Real-World Applications and Scenarios
Troubleshooting Tips
The ability to list processes can be instrumental in troubleshooting system issues. For example, if you notice a sudden spike in CPU usage, you can quickly run `tasklist` to identify which application is consuming resources excessively. Once identified, you can choose to terminate that process, thereby restoring normal performance.
Automation Scripts
By incorporating process listing commands into batch scripts, you can automate system checks to maintain performance or log process data for future analysis. An example batch script might include:
@echo off
echo Current Processes on %DATE% at %TIME% >> process_log.txt
tasklist >> process_log.txt
This script appends the current list of processes to process_log.txt along with a timestamp, enabling systematic monitoring.
Mastering The Cmd List Command: Quick Tips For Success
Conclusion
Knowing how to use the cmd list processes effectively is invaluable for managing your system environment. It helps in maintaining optimal performance and resolving issues quickly. As you become more familiar with these commands, consider exploring additional CMD functionalities for greater system management. For ongoing learning, subscribe to receive more tutorials and insights into CMD and its capabilities.
In Windows, we can get the list of processes running on the system from command prompt also. We can use ‘tasklist‘ command for this purpose.
Using this command we can selectively list the processes based on criteria like the memory space used, running time, image file name, services running in the process etc. Below you can find the syntax and examples for various cases.
Get the list of all the process running on the system
tasklist
Get the list of process using memory space greater than certain value.
tasklist /fi "memusage gt memorysize"
Memory size should be specified in KB
For example, to get the list of processes occupying more than 30MB of memory, we can run the below command.
tasklist /fi "memusage gt 30000"
Find the list of processes launched by a user
tasklist /fi "username eq userName"
Find the memory usage of a specific process
tasklist /fi "pid eq processId"
Example:
c:\>tasklist /fi "pid eq 6544" Image Name PID Session Name Session# Mem Usage ========================= ======== ================ =========== ============ WmiPrvSE.exe 6544 Services 0 8,936 K
Find the list of not responding processes
tasklist /fi "status eq not responding"
example:
c:\>tasklist /fi "status eq not responding" Image Name PID Session Name Session# Mem Usage ========================= ======== ================ =========== ============ rundll32.exe 3916 Console 1 7,028 K
Get the list of services running in a process
tasklist /svc /fi "pid eq processId"
Example:
c:\>tasklist /svc /fi "pid eq 624" Image Name PID Services ========================= ======== ============================================ lsass.exe 624 EFS, KeyIso, Netlogon, ProtectedStorage, SamSs, VaultSvc c:\>
Get list of processes running for more than certain time
tasklist /fi "cputime gt hh:mm:ss"
example:
Get the list of processes that have been running from more than an hour and 20 minutes.
c:\>tasklist /fi "cputime gt 01:20:00" Image Name PID Session Name Session# Mem Usage ========================= ======== ================ =========== ============ System Idle Process 0 Services 0 24 K SynTPEnh.exe 4152 Console 1 8,080 K firefox.exe 1740 Console 1 857,536 K c:\>
Find processes that are running a specified image file:
tasklist /fi "imagename eq imageName"
Example:
c:\>tasklist /fi "imagename eq firefox.exe" Image Name PID Session Name Session# Mem Usage ========================= ======== ================ =========== ============ firefox.exe 1740 Console 1 812,160 K c:\>
Find the process running a specific service
tasklist /fi "services eq serviceName"
example:
c:\>tasklist /fi "services eq webclient" Image Name PID Session Name Session# Mem Usage ========================= ======== ================ =========== ============ svchost.exe 1052 Services 0 20,204 K c:\>
Related Posts:
How to kill a process from windows command line.
Все способы:
- Способ 1: «Диспетчер задач»
- Способ 2: «PowerShell»
- Способ 3: «Командная строка»
- Способ 4: Сторонние приложения
- Вопросы и ответы: 0
Способ 1: «Диспетчер задач»
Для просмотра процессов и управления ими в Windows 10 предусмотрено штатное приложение «Диспетчер задач». Его использование является самым простым, удобным и наглядным способом получения сведений о запущенных в системе системных и сторонних процессов.
- Откройте «Диспетчер задач» из контекстного меню «Панели задач» или любым другим удобным вам способом.
Подробнее: Способы открыть «Диспетчер задач» в Windows 10
- Список процессов, а если точнее, их названий, доступен для просмотра в одноименной вкладке: в ней будет указан уровень загрузки ЦП, ОЗУ, диска и сети для каждого процесса.
- Если слева от имени процесса располагается импровизированная стрелка, значит, процесс содержит один и более подпроцессов. Кликните по стрелке, чтобы просмотреть подпроцессы.
Просмотреть процессы в «Диспетчере задач» можно также на вкладке «Подробности». Здесь, помимо исполняемого файла процесса, для просмотра доступны такие данные, как его идентификатор, состояние, владелец, используемый объем памяти и название.
Способ 2: «PowerShell»
Вывести список запущенных процессов можно также с помощью консоли «PowerShell». Способ хорош тем, что позволяет получать дополнительные данные о процессах и гибко сортировать их при необходимости.
- Откройте консоль «PowerShell» от имени администратора из контекстного меню кнопки «Пуск».
- Введите в консоли команду
Get-Process
и нажмите клавишу ввода.
В результате вы получите список процессов с указанием таких свойств, как количество дескрипторов ввода («Handles»), выгружаемый и невыгружаемый размер данных процесса «(PM(K) и NPM(K))», объем используемой процессом памяти («WS(K)»), процессорное время («CPU(s)») и идентификатор («ID»). Имя процесса будет указано в столбце «ProcessName».
Способ 3: «Командная строка»
Для получения списка процессов сгодится и классическая «Командная строка», однако в этом случае вы получите несколько меньший объем свойств процессов.
- Откройте «Командную строку» от имени администратора через поиск или другим известным вам методом.
Подробнее: Открытие «Командной строки» в Windows 10
- Выполните команду
tasklist
.
В результате, помимо названий процессов, вы получите следующие сведения: идентификаторы, имя сессии, номер сеанса и объем ОЗУ, потребляемый каждым процессом.
Способ 4: Сторонние приложения
Если вы хотите получить о запущенных процессах максимум деталей, лучше использовать специализированные сторонние программы, например Process Explorer — мощный бесплатный инструмент управления процессами.
Скачать Process Explorer с официального сайта
- Скачайте исполняемый файл утилиты procexp.exe или procexp64.exe и запустите.
- Если до этого программа никогда не запускалась, вам будет предложено принять лицензионное соглашение.
- В результате в левой колонке приложения будет выведен список всех запущенных на компьютере процессов. Если нужно просмотреть свойства процесса, кликните по нему два раза мышкой.
Одним лишь просмотром процессов и их свойств возможности Process Explorer не ограничиваются. С помощью этой небольшой портативной программы вы можете принудительно завершать работу процессов, изменять их приоритет, создавать дампы памяти, выявлять связанные динамические библиотеки, а также выполнять другие операции.
Наша группа в TelegramПолезные советы и помощь
One of our readers asked us: “How do you print the list of running processes from Task Manager?”. Unfortunately, you can’t do this from Task Manager. However, you can run some commands to generate a list of running processes in Windows and then print it like you would print a standard document. Here’s how it all works, using only the tools built into Windows:
NOTE: This guide applies to all versions of Windows, including Windows 10 and Windows 11.
How to print the list of running processes using the tasklist command (in CMD, PowerShell, or Windows Terminal)
The tasklist command can output the list of active processes to a text file on your PC, which you can then print easily. You can run this command in any command-line environment you prefer: Command Prompt, PowerShell, or Windows Terminal.
Simply open the Command Prompt (or one of the other two) and type:
tasklist > “path to file”
Replace path to file with the actual path towards the file you want to create on your disk with the list of running processes. Then, press Enter on your keyboard. I wanted to save the list in a file named processes.txt on my D drive, so I typed:
tasklist > “D:\processes.txt”
Running the tasklist command
Open File Explorer and navigate to the path you specified for your file. Double-click on the file to open it. It should display data similar to the screenshot below. The list of running processes is placed in a table with the following columns: Image Name (the name of the process), PID (Process ID), Session Name, Session# (# stands for Number), and Mem Usage (Memory Usage).
The output of the tasklist command
Feel free to print (press CTRL+P) the list of active processes using your default printer.
NOTE: The tasklist command has many parameters you can use to format its output. Complete documentation can be found on Microsoft’s TechNet website: Tasklist. Don’t hesitate to read it and experiment on your own.
How to print the list of running processes using the Get-Process command (in PowerShell or Windows Terminal)
There’s another command you can use, but only in PowerShell and Windows Terminal. It is named get-process or gps (the short version). To use this command, open PowerShell (or a PowerShell tab in Windows Terminal) and type the following:
get-process | out-file “path to file”
or
gps | out-file “path to file”
I wanted to save the list in a file named process.txt on my D drive, so I typed:
get-process | out-file “D:\process.txt”
or
gps | out-file “D:\process.txt”
Running the get-process command in PowerShell
The output file is formatted, and it includes the following columns:
- Handles — the number of handles that the process has opened.
- NPM(K) — the amount of non-paged memory that the process is using, in kilobytes.
- PM(K) — the amount of pageable memory that the process is using, in kilobytes.
- WS(K) — the size of the process’s working set in kilobytes. It consists of the pages of memory that were recently referenced by the process.
- CPU(s) — the amount of processor time that the process has used on all processors in seconds.
- Id — the process ID (PID) of the process that is running.
- SI — the session ID of the process.
- ProcessName — the name of the process.
The output of the get-process command
You can now easily print the list of running processes from Notepad or any other app you used to open the file containing the processes list.
NOTE: As you can see, the output of the get-process command is more complex than what you get from tasklist. Also, there are more options available to customize it. Therefore, I recommend you to read the following documentation: Get-Process (Get a list of processes running on a machine), Out-File (Send output to a file), and Out-Printer (Send output to a printer).
How to print the list of running processes using WMIC (in CMD, PowerShell, or Windows Terminal)
WMIC or Windows Management Instrumentation Command line is a software utility that allows users to perform Windows Management Instrumentation (WMI) operations from any command-line environment (Command Prompt, PowerShell, or Windows Terminal). You can use it for many tasks, including saving a list with all running processes in a text file that you can print. To do that, open any command-line environment you want in Windows. We’ve chosen to start Windows Terminal. Next, type this command:
wmic /output:»path to file» process list brief
Replace path to file with the actual path towards the file you want to create, and then press Enter on your keyboard.
Running the wmic command in Windows Terminal
I wanted to save the list of running processes in a file named process.txt on my D drive, so I typed:
wmic /output:»D:\process.txt» process list brief
The resulting file looks similar to the screenshot below and the information is split into the following columns:
- HandleCount — the number of operating system handles that the process has opened.
- Name — the name of each running process.
- Priority — the priority assigned by Windows to each process. The higher the number, the higher the priority.
- Process ID — the ID of the process, as assigned by Windows.
- ThreadCount — the operating system threads currently running in the associated process.
- WorkingSetSize — the total amount of physical memory each process is using, in bytes.
The output you get from wmic
For more information about the properties of each process, read this documentation from Microsoft: Win32_Process class.
How did you print the list of running processes?
I hope that you’ve found this tutorial helpful and you’ve managed to print the list of processes running on your Windows computer or device. Before closing, let us know in a comment which command you prefer and why. Also, if you know other methods for printing a list of the processes that are running in Windows, don’t hesitate to share them.