Linux kill

The most common command to terminate a process is kill command. You need to know the PID of the process you want to terminate.

kill command sends signal to the specified process. For sending signal either signal name or signal number can be used.

Syntax:


Common signal names and numbers

Here is a list of some common signal names and signal numbers. Please note that these signal names and signal numbers may vary. For complete information about signals refer to the man page of the signal with command "man 5 signal" or "man 7 signal".

Signal NameSignal NumberSignal Use
SIGNULL0NULL, check access to PID
SIGHUP1Hangup
SIGINT2Interrupt
SIGQUIT3Quit
SIGKILL9Kill
SIGTERM15Terminate
SIGSTOP24Stop
SIGTSTP25Stop/pause the process
SIGCONT26Continue a stopped process

To list signal names

To see a list of signal names in your system, following command can be used.

Syntax:

Linux kill1

Example:

To kill a process having PID 2408, use following command

kill -9 2408

Next TopicLinux killall




Latest Courses