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

SignalDescriptionExample
SIGTERMRequests a process to terminate but allows it to perform cleanup operations before terminating.kill -SIGTERM 1234
SIGKILLForces a process to terminate immediately.kill -SIGKILL 1234
SIGSTOPPauses a process.kill -SIGSTOP 1234
SIGCONTResumes a paused process.kill -SIGCONT 1234
SIGHUPSends a signal to a process when the terminal controlling it is closed.kill -SIGHUP 1234
SIGINTSends an interrupt signal, usually initiated by the user.kill -SIGINT 1234
SIGQUITSends a quit signal, which often results in a core dump.kill -SIGQUIT 1234
SIGABRTSends an abort signal, which often results in a core dump.kill -SIGABRT 1234
SIGALRMUsed to alarm/countdown.kill -SIGALRM 1234
SIGUSR1 and SIGUSR2User-defined signals.kill -SIGUSR1 1234