Lesson 13 / 29
Killing Processes
Stopping a process by PID or name.
kill by PID
kill PID sends a termination signal, asking the process to shut down gracefully.
ps aux | grep nginx
kill 842kill -9 — force it
kill -9 PID (SIGKILL) forcibly terminates a stuck process with no cleanup — use it only when a plain kill doesn't work.
kill -9 842killall & pkill
killall nginx kills every process named nginx. pkill -f pattern matches against the full command line.