kill
command
kill
: Terminates individual processes based on their Process ID (PID).killall
: Terminates all processes with a specific name.
Can only kill your own processes, unless you add sudo
, you can kill other people’s processes.
Resources
kill -KILL 55459
Signal | Description | Example |
---|---|---|
SIGTERM | Requests a process to terminate but allows it to perform cleanup operations before terminating. | kill -SIGTERM 1234 |
SIGKILL | Forces a process to terminate immediately. | kill -SIGKILL 1234 |
SIGSTOP | Pauses a process. | kill -SIGSTOP 1234 |
SIGCONT | Resumes a paused process. | kill -SIGCONT 1234 |
SIGHUP | Sends a signal to a process when the terminal controlling it is closed. | kill -SIGHUP 1234 |
SIGINT | Sends an interrupt signal, usually initiated by the user. | kill -SIGINT 1234 |
SIGQUIT | Sends a quit signal, which often results in a core dump. | kill -SIGQUIT 1234 |
SIGABRT | Sends an abort signal, which often results in a core dump. | kill -SIGABRT 1234 |
SIGALRM | Used to alarm/countdown. | kill -SIGALRM 1234 |
SIGUSR1 and SIGUSR2 | User-defined signals. | kill -SIGUSR1 1234 |