LKBEN10696: Howto stop a process from the command line with windows


Symptom

You need to have an alternative for a kill command under linux

Cause

A program hangs or consumes to much cpu

Solution

You can use the taskkill command to do the job. With taskkill you can ask a program to stop or force it to stop. Before you use taskkill, you can use the tasklist command to find the pid (program identifier) of the program you need to stop.

This will kill (force) the program with pid 1234.

taskkill /PID 1234 /F

You can also give a name to taskkill:

With /T you can kill the program structure or tree

TASKKILL /S System /F /IM write.exe /T

You can kill more than on PID at the same time:

TASKKILL /PID 1230 /PID 1241 /PID 1253 /T

For more information you can use the /? parameter.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.