kill command on Debian

On November 19, 2008, in debian, linux tips, tricks, ubuntu, by Dipin Krishna

In technical terms, kill simply sends a signal. By default it sends a signal which requests termination (TERM, or signal 15); but you can also specify a signal, and signal 9 (KILL) is the signal which forces termination. The command name kill is not necessarily appropriate to the signal sent; for example, sending the TSTP (terminal stop) signal suspends the process but allows it to be continued later.

kill %1 – means Kill off job 1. Bash will report the job information:

$ kill %1
[1]- Terminated man cp
$

Bash is only asking the job to quit, and sometimes a job will not want to do so. If the job doesn’t terminate, you can add the -9 option to kill to stop asking and start demanding. For example:

$ kill -9 %1
[1]- Killed man mv
$

The -9 option forcibly and unconditionally kills off the job.

 

Leave a Reply

*

Search