[Ilugc] One Day One GNU/Linux Command (KILL)

  • From: sbharathi@xxxxxxxxxxxxx (Bharathi Subramanian)
  • Date: Thu Jul 17 09:28:34 2008

"No Software Patents!" -- Allowing patents over software ideas will 
seriously affect the  Creativity,  Productivity and  Freedom of all.
Link: http://www.nosoftwarepatents.com/

One Day One GNU/Linux Command
=============================

kill -- Sends a signal to processes.

Summary :

The command kill sends the specified signal to the specified process
or process group.  If no signal is specified, the TERM signal is sent.
Signals are used for inter process communications. Two kill commands
are available. One is built-in SHELL (default) and 2nd is in
/usr/bin/kill.

Examples :

$ kill -l -- Print a list of signal names with numbers.

$ kill -l SIGIO -- Print the number for SIGIO signal.

$ kill -l 9 -- Print the Name for the Signal number 9.

$ kill 100 200 -- Send TERM signal to processes with PID 100 and 200.

$ kill -s 9 100 -- Send KILL signal to process with PID 100.

$ kill -n SIGKILL 100 -- Same as above

$ kill -SIGKILL 100 -- Same as above.

$ kill -9 100 -- Same as above. We can use either Signal Name 
                 (SIGKILL) or Number(9).

$ kill -9 -1 -- Kill all your login sessions. But Not the current one.

NOTE: Kill is a shell builtin for 2 reasons: it allows job IDs to be
used instead of process IDs, and, if you have reached the limit on
processes that you can create, you don't have to start a process to
kill another one.

Read : man kill, signal(7)

HTH :)
--
Bharathi S

Other related posts:

  • » [Ilugc] One Day One GNU/Linux Command (KILL) - Bharathi Subramanian