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.

Killing processes

Each process you start is usually completed within a few seconds. Sometimes a background process or a process without a controlling terminal hangs up and you will need to destroy this process by killing it.

To kill a process use the kill command.

   kill [-signal] process_identifier (PID)

Use the ps command if you need to find the PID of a process.

Always try to kill a process with a simple kill command.

   kill process_identifier

This is the cleanest way to kill a process and has the same effect as cancelling a process.

If this does not work use the -1 (one) signal.

   kill -1 process_identifier

This tells the process to hangup just as though you were logging out. The system will attempt to kill any child processes.

As a last resort use the -9 signal:

   kill -9 process_identifier

This will stop the process dead in its tracks but it may leave any child processes still running.


[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