music
OSdata.com: programming text book 

OSdata.com

kill

summary

    This subchapter looks at kill, a Unix (and Linux) command.

free book on Unix/Linux System Administration

Teach Yourself Unix/Linux System Administration and Shell Programming

free computer programming text book project

table of contents
If you like the idea of this project,
then please donate some money.
more information on donating

Google

kill

    This subchapter looks at kill, a Unix (and Linux) command.

    kill is used to send signals to a process, most often to stop processes.

    kill is a builtin command in csh. There is also an external utility with the same name and functionality.

which processes can be killed

    An ordinary user can only kill his or her own processes.

    A system administrator running as root (including using sudo) can use kill on any process on the entire system.

frozen process

    Sometimes a process (particularly web browsers) will freeze up. The kill command can be used to remove the frozen program from the system.

    If a user finds their display locked up because of a frozen program, he or she can login to another computer, then login to the original system using rlogin, and then use the kill command to stop the offending process using the specific process ID.

killall

    killall is a related command. killall program_name will stop all processes with the program name, so the more specific kill with a specific process ID is usually used first.

process isolation

    Unix does a very good job of keeping processes isolated from each other, so that no rogue process can attack or damage any other process.

    Unlike Windows, a frozen or crashed program on UNIX or Linux shouldn’t be able to bring the entire operating system to a halt.

    Most Unix vendors carefully test their own system software and most of the system software has been running and tested for decades, so those programs rarely cause problems.

    Most bugs occur in third party software and in custom software developed for a particular installation.

remove background process or job

    The most common use of kill is simply to remove a process or job. This is done by naming the PID of the process (whcih is usually obtained with ps).

    $ kill PID

    This works because the default signal is SIGTERM (terminate the process).

discover signals

    You will find a chart of signals with the common signals for Linux, Mac OS X, and Solaris.

    You can also discover the list for your system by running kill with the -l (lower case L) option.

    $ kill -l

    You can determine a specific signal with the -l option and a signal number.

    $ kill -l 3
    QUIT
    $

    Some operating systems give the entire signal name with the SIG prefix (such as SIGQUIT) and some give just the signal name (such as SIGQUIT).

testing

    You can test the capabilities of your programs and scripts under abnormal coonditions by using kill to send a specific signal.

    $ kill -s SIGNAME PID

    The signal name (SIGNAME) can be the signal number or the signal name. The signal name can be either the signal name with or without the SIG prefix.

    You may also simply enter the signal number or signal name (with or without the SIG prefix) as an option.

    $ kill -6 PID
    $ kill -SIGIOT PID
    $ kill -IOT PID

other

    On November 8, 2010, Ramesh Natarajan named this the number 26 most frequently used Unix/Linux command at this web page 50 Most Frequently Used UNIX / Linux Commands (With Examples).


comments, suggestions, corrections, criticisms

please contact us

your name:
email address:
phone number:
message:

free music player coding example

    Coding example: I am making heavily documented and explained open source code for a method to play music for free — almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).

    View music player in action: www.musicinpublic.com/.

    Create your own copy from the original source code/ (presented for learning programming).

This section is under the category of owning cirticism.

In response to a posting about my article collecting social media, Moderator +Andrew Smith (Technology addict, Web Developer, API guru, futsal and football wannabe, and all round nice guy!, Swordfox Design, arrowtown, new zealand) of the Google+ community Web Developers, Web Designers, Web Coding claims “Quite frankly this is self promotion, and your site is not of great quality. I can see how +Joost SchuurÊ would think this of not high enough a standard.”


return to table of contents
free downloadable college text book
free downloadable system administrator and shell programming book

view text book
HTML file

Because I no longer have the computer and software to make PDFs, the book is available as an HTML file, which you can convert into a PDF.

previous page next page
previous page next page

free book on Unix/Linux System Administration

Teach Yourself Unix/Linux System Administration and Shell Programming

free computer programming text book project

Building a free downloadable text book on computer programming for university, college, community college, and high school classes in computer programming.

If you like the idea of this project,
then please donate some money.

send donations to:
Milo
PO Box 1361
Tustin, California 92781

Supporting the entire project:

    If you have a business or organization that can support the entire cost of this project, please contact Pr Ntr Kmt (my church)

more information on donating

Some or all of the material on this web page appears in the
free downloadable college text book on computer programming.


Google


Made with Macintosh

    This web site handcrafted on Macintosh computers using Tom Bender’s Tex-Edit Plus and served using FreeBSD .

Viewable With Any Browser


    †UNIX used as a generic term unless specifically used as a trademark (such as in the phrase “UNIX certified”). UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd.

    Names and logos of various OSs are trademarks of their respective owners.

    Copyright © 2012, 2014 Milo

    Created: February 5, 2012

    Last Updated: July 30,2014


return to table of contents
free downloadable college text book
free downloadable system administrator and shell programming book

previous page next page
previous page next page