How can I stop a process from the command line?

John Savill

January 8, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. A. Usually to stop a process, you start task manager, select the Processes tab, select the process and click "End Process" however you can also accomplish the same from the command prompt using 2 Resource Kit utilities.

Firstly you need to get a list of all processes on the system and this is accomplished using the tlist.exe utility.

C:>tlist
0 System Process
2 System
20 smss.exe
26 csrss.exe
34 WINLOGON.EXE
42 SERVICES.EXE
45 LSASS.EXE
72 SPOOLSS.EXE
91 Nettime.exe
64 navapsvc.exe
...
198 notepad.exe Untitled - Notepad
214 TLIST.EXE

The first part, the number, is the process ID, for example, 198 is the process ID of the notepad.exe process that is running. Once we know the Process ID (or PID) we can stop it using the kill.exe utility.

C:>kill 198
process #198 killed

You can optionally use the -f switch which forces the process kill.

You may, if you wish, kill a process on its name instead, e.g.

c:>kill notepad.exe

will also work.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like