kill & killall command

The kill command allows you to kill one process ID or multiple process IDs.

Syntax

The syntax for the kill command is:
kill [options] IDs

Options

OptionDescription
-lLists the signal names.
-signalThe signal number of name. Using the signal number of 9, means that the kill is absolute.



kill 123 4567
Sends the default signal (KILL, signal number 9) for the processes with IDs 123 and 4567. Those processes are terminated.
kill -9 -1
Kill all processes the user has permission to kill, except the root process (PID 1) and the kill process itself.
killall is a tool for terminating running processes on your system based on name.
The killall command takes the following form:
killall [process name]
killall will terminate all programs that match the name specified. Without additional arguments, killall sends SIGTERM, or signal number 15, which terminates running processes that match the name specified. You may specify a different signal using the -s option as follows:
killall -s 9 [process name]
This sends the SIGKILL signal which is more successful at ending a particularly unruly processes. You may also specify signals in one of the following formats:
killall -KILL [process name]
killall -SIGKILL [process name]
killall -9 [process name]

Comments

Popular posts from this blog

gsutil Vs Storage Transfer Service Vs Transfer Appliance

SQL basic interview question