Skip navigation

How can I stop a process from the command line?

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.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish