System MonitoringLesson 29Free preview
Bash Terminate (kill)
This lesson is part of Bash · All levels
Summary
The kill command sends a signal to the process based on its PID, usually to stop the program. The built-in signal is the TERM that allows the process to clear itself, whereas KILL forces the process to die instantly. Use negative 9 only when the process doesn't respond to the usual signal.
Key points
- kill PID sends a TERM signal (15) by default
- kill -9 forces the process to die instantly.
- Take the PID from the pgrep or ps aux
- kill -l is displaying a list of signals
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.