The kill command

Send a signal to a job. 6 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-l
list the signal names; if arguments follow `-l' they are assumed to be signal numbers for which names should be listed

Examples

kill PID

Send SIGTERM (graceful stop)

kill -9 PID

Send SIGKILL (force kill)

kill -SIGTERM PID

Same as kill PID

kill -l

List all signals

kill -9 <PID>

Stop a suspicious process

sudo kill 4711

The space is freed when the last process closes the file

Lessons that use kill