Linux Killall Command Examples and Help(What is, Concept and Definition)

On Unix-like operating systems, the killall command forcibly terminates processes, specified by name.


This document describes the GNU/Linux version of killall .

Description


killall sends a signal to all processes executing any of the specified commands.If no signal name is specified, SIGTERM is sent.


Tokens can be specified by name (for example, -HUP or -SIGHUP ) or by number (for example, -1 ) or by the -s .

option

If the command name is not a regular expression (option -r ) and contains a forward slash (/), the processes that execute that particular file will be they will select to kill them, regardless of their name.


killall returns a zero return code if at least one process has been killed for each listed command, or if no commands were listed and at least one process matched the -u and -Z search criteria. killall returns a non-zero value.


A killall process never kills itself (but it can kill other killall processes).


Syntax

killall [-Z,-context pattern ] [-e,-exact] [-g,-process-group] [-i,-interactive ] [-o,-older-than TIME ] [-q,-quiet] [-r,-regexp] [-s,-signal signal ] [-u,-user user ] [-v,-verbose] [-w,-wait] [-y,-younger-than TIME ] [-I,-nignore-case] [-V,-version] [-] name ...killall-l killall-V,-version

Options
































-e , --exact

Requires an exact match for very long names.If a command name is more than 15 characters long, the full name may not be available (i.e.swapped).In this case, killall will kill everything that matches the first 15 characters.With -e , such entries are skipped. killall prints a message for each skipped entry if -v in addition to -e .

-I , --ignore-case

Match the process name case insensitive.

-g , --process-group

Delete the group of processes to which the process belongs.The interrupt signal is only sent once per group, even if several processes belonging to the same group of processes were found.

-i , --interactive

Interactively ask for confirmation before killing.

-l , --list

List all known signal names.

-o , --older-than

Matches only processes that are older (started earlier) than the specified time.The time is specified as floating and then as unit.Units are s , m , h , d , w , M , and for seconds , minutes, hours, days, weeks, months and years respectively.

-q , --quiet

Don't complain if no processes were killed.

-r , --regexp

Interpret the process name pattern as an extended regular expression.

-s , --signal

Send this signal instead of SIGTERM .

-u , --user

Kill only processes the rights of the specified user.Command names are optional.

-v , --verbose

Inform if the signal was sent correctly.

-V , --version

Show version information.

-w , --wait

Wait for all killed processes to die. killall checks once per second if any of the killed processes still exist and only returns if none remain.Please note that killall can wait forever if the signal is ignored, has no effect, or if the process remains in a zombie state.

-y , --younger-than

Matches only younger processes (started after) than the specified time.The time is specified as floating and then as unit.Units are s , m , h , d , w , M , and for seconds, minutes , hours, days, weeks, months and years respectively.

-Z , --context

(SELinux only) Specify the security context: kill only the processes that have a security context that matches the worn regular expression given pattern.Must precede other arguments on the command line.the commands are optional.

Known Bugs


File deletion only works for executables that are kept open during execution, i.e.impure executables cannot be removed in this way.


Please note that typing killall name may not have the desired effect on non-Linux systems, especially when done by a privileged user.


killall-w does not detect if a process disappears and is replaced by a new process with the same PID between scans.


If the processes change their name, killall may not be able to match them correctly.


killall has a limit of names that can be specified on the command line.This figure is the size of an unsigned length multiplied by 8.For most 32-bit systems, the limit is 32 and, for similarly, for a 64-bit system, the limit is usually 64.


Examples

killall UnResponsiveProg

Terminate the process called " UnResponsiveProg ".

killall-I does not respondprog

Terminate any process that matches the string " project not responding ", ignoring the difference between upper and lower case letters.

kill -It sends a signal to a process, affecting its behavior or killing it. ps -Informs the status of a process or processes.

Comments