kill
Use /bin/kill to signal to running processes from command line.
kill [-signal] process-ID.
- kill - keyword.
On our system, both a bash internal
and a program, /bin/kill
The internal runs unless bash is invoked with path.
- -signal - optional signal.
Can be a signal #, or the symbolic name.
Default is 15, (TERM or SIGTERM), if no signal specified.
Alternative forms, example SIGHUP, hangup :
-l #(el) lists symbolic signals.
-1 # signal number
-s 1 # -s option and signal number
-HUP # symbolic name
-SIGHUP # symbolic name
# --signal /bin/bash only. signal is a keyword.
--signal 1
--signal SIGHUP
--signal HUP
- process-ID - list of process IDs.
bash kill will also take job IDs in current shell.
killall version of kill that affect multiple processes.
Useful for run-away recursion or parallel processing (threads).
killall [-signal] [-options] process-by-name-target
- killall - keyword
- [-signal] - signal. If not specified, uses SIGTERM.
- [-option[s]] - options that affect how target is interpreted.
- no options - targets all processes whose filename matches target.
filenames longer than 15 characters can cause problems.
- -i - interactive, prompt user before each kill.
- -I - ignore case of process filename.
- -r - regular expression. Use regular expression to specify a
group of similar process names.
- -s - send specific signal. Seems to work with just -#.
- -u user - kill all processes owned by specified user.
This is more for an admin.
killall -u your-id
will terminate your login shell. Use with -i, to be more surgical.
Additional options exist.