How To End A Process From The Command Line

Table of contents:

How To End A Process From The Command Line
How To End A Process From The Command Line

Video: How To End A Process From The Command Line

Video: How To End A Process From The Command Line
Video: End a Process using Command Prompt in Windows 10 2024, December
Anonim

Despite the fact that modern operating systems are becoming more reliable and easier to manage, it still sometimes becomes necessary to unload a process or service from the command line. It is also useful to know the order of stopping a program by a command in order to use them in command scripts to automate any actions.

How to end a process from the command line
How to end a process from the command line

Necessary

To perform all the actions, you do not need any additional programs - all the necessary utilities are provided by the operating system itself

Instructions

Step 1

The most correct way to terminate the program using the command line is to use the taskkill utility. This utility sends a termination signal to the selected process, which prevents data corruption or disruption of the operating system. To stop the program, enter the command in the "taskkill PID_process" format.

Step 2

To find out the PID of the required process, use the tasklist utility. Enter the command "tasklist" and find the program you need in the list displayed. Opposite it, in the first column, you will find the desired PID value as a four-digit number.

Step 3

If you cannot determine the PID of the process, then you can stop the process by the name of the executable file using the pskill utility. Enter the command "pskill executable_name" on the command line, and the program will close immediately.

Recommended: