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.


Discuss this Article 7

Richard Hagen (not verified)
on Oct 29, 2003
how would this work without the resource kit, is there not anything you can do bayuorself?
yahoo
on Aug 23, 2007
tskill processname don't use the exe extension
Anonymous User (not verified)
on Jul 28, 2005
look for tskill, it works similarly in winxp
Anonymous User (not verified)
on Nov 2, 2004
this is great exactly what i needed

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.