View system information and manage processes from CMD or PowerShell

View system information and manage processes from CMD or PowerShell

The easiest way to view information about your computer is to use Windows graphical tools such as Task Manager or System Information. However, some people prefer to use the Command Prompt or PowerShell for, well, almost anything. If you're wondering how to get system info in CMD (Command Prompt), or if you want to learn how to manage running processes from the command line, read on. We're going to show how you can do all of these things:

Advertisement

NOTE: The information in this tutorial applies to Windows 10, Windows 8.1, and Windows 7, and the commands work both in Command Prompt and PowerShell.

1. Use the systeminfo command to get system information

Windows has a built-in command to check the system configuration. It's called systeminfo and, when you run it, it shows you a long list of information about your computer. Open Command Prompt or PowerShell, type systeminfo and press Enter.

Using the systeminfo command to get system information
Using the systeminfo command to get system information

Do you see what's happening? The systeminfo command displays a list of details about your operating system, computer hardware and software components. You see details such as the version of the operating system installed on your computer, the status of your RAM or the processor that you have. There's also some network information, like the IP and the MAC addresses of your network cards.

Advertisement

2. Use the tasklist command to see the list of running processes in Windows

To view the list of the processes that are currently running, you can use the tasklist command, both in Command Prompt and PowerShell. Type tasklist and press Enter.

Using the tasklist command to see the list of currently running processes
Using the tasklist command to see the list of currently running processes

The command should output a list similar to the one above, with details about the names of running processes, their PID (Process identifier) and the memory they use.

3. Use the taskkill command to stop a process

To kill or stop a running process from Command Prompt or PowerShell, you can use the taskkill command. Let's assume that you want to stop OneDrive. Its process is called OneDrive.exe. To kill it, you should run the command taskkill /f /im OneDrive.exe. The /f parameter tells Windows to forcefully terminate the process, and the /im parameter is used to identify and stop a process by typing its name.

Using the taskkill command to stop a process
Using the taskkill command to stop a process

There are times when you need to open a program twice or even several times. Every new window and sometimes the tabs of a specific program (for example, Firefox) creates a separate process called instance with a unique PID (Process identifier) attached to it.

Advertisement

To stop a single instance of a process, you need to specify its PID (Process identifier). Let's assume that there are a couple of instances of Firefox open on your computer. The process's name is firefox.exe, but you want to close only one of its running instances (tabs, windows).

Multiple instances of a process have unique process identifiers
Multiple instances of a process have unique process identifiers

If you want to kill the process that has a PID of 2492, you should type taskkill /PID 2492 and then press Enter.

Killing a process in cmd using its PID
Killing a process in cmd using its PID

Another parameter that you can use for the command taskkill is /t. This parameter allows you to terminate a specified process and any child processes which were started by it. Take the same example: the Firefox process. Let's assume that you have eight processes, and you want to kill all of them using the parameter /t. You should type the command "taskkill /t /im firefox.exe" and then press Enter. Check the screenshot below to see the confirmation of the command you just typed.

Using cmd to kill all the child processes of a process
Using cmd to kill all the child processes of a process

Note that if you misuse the commands listed in this article, you risk losing the data opened in the running processes. It is essential to be careful and have a backup available for your data. Therefore proceed carefully and do not say that we didn't warn you. 🙂

NOTE: To be able to kill any running process, you need to run the Command Prompt or PowerShell as administrator. If you do not know how, read: 9 ways to run programs as administrator in Windows.

Do you like using the command line to check for system info and manage your running processes?

You know how to display the system information of your PC, and how to stop processes, using a few text commands in the Command Prompt or PowerShell. Don't you feel geeky right now? If you do, comment below, and tells us how much you enjoy using CMD or PowerShell. 🙂

Discover: Productivity Command Prompt PowerShell Programs Recommended System and Security Tutorials Windows