90
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 Name | Signal Number | Signal Use |
---|---|---|
SIGNULL | 0 | NULL, check access to PID |
SIGHUP | 1 | Hangup |
SIGINT | 2 | Interrupt |
SIGQUIT | 3 | Quit |
SIGKILL | 9 | Kill |
SIGTERM | 15 | Terminate |
SIGSTOP | 24 | Stop |
SIGTSTP | 25 | Stop/pause the process |
SIGCONT | 26 | Continue a stopped process |
To list signal names
To see a list of signal names in your system, following command can be used.
Syntax:
Example:
To kill a process having PID 2408, use following command
kill -9 2408
Next TopicLinux killall