What does kill do?
kill sends a signal to a process by its PID — by default asking it to stop (SIGTERM). kill -9 forces it to stop immediately.
kill [-signal] PID
Most useful options
| Option | What it does |
|---|---|
| -15 | polite stop (default) |
| -9 | force kill, cannot be ignored |
| -l | list signals |
kill examples
In security work
Kill a malicious process only after collecting evidence (ps, ls -l /proc/PID/exe), or you lose it.
Questions about kill
What is the difference between kill and kill -9?
kill asks politely so the program can clean up; kill -9 stops it instantly with no clean-up.