UNIX Guide, for beginners and Mac OS X users
You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > (index) supportSupport - ask in our friendly forums.

Examples of using the kill command

To kill a single process:

   ps
     PID TT STAT  TIME COMMAND
     9408 p9 S     0:00 ue temp2.xdh
     9450 pa S     0:01 -Tcsh (Tcsh)
     9501 pa T     0:00 less csh.1
     9503 pa R     0:00 ps
   kill 9501

This kills process number 9501. Notice that the ps command which is entered to check on the process ID's has the latest process number.

To kill a process that refuses to die:

   kill -9 9352

This makes a certain kill of process number 9352.

To kill a background job:

   jobs
   [1]  + Running              xterm -g 70x55
   kill %1
   [1]    Done                 xterm -g 70x55

This kills job number 1 (one); the only job that is currently running. The Bourne shell does not support this feature.

To kill more than one process:

   kill 8939 9543

This kills processes 8939 and 9543.


[Home]UNIX Guide home | [Search]search | index
Page URL: http://sillydog.org/unix/
[SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap]
This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006
Netscape NOW!Made on a Mac
support MozInfo701 and SillyDog701