1. When to use it
Useful for daily maintenance, clean restarts, and PID checks without targeting mistakes.
ps | pgrep | pkill | signals | process management
2. Base setup
ps aux | grep '[n]ginx'
pgrep -a sshd
pkill -HUP syslogd
Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.
3. Quick verification
ps -o pid,ppid,cmd -C syslogd
pgrep -laf nginx
kill -l
Confirm that the output matches the expected state before considering the intervention complete.
4. Operational notes
Before using KILL try less destructive signals such as HUP or TERM: often it is enough to ask the process to exit cleanly.
Quick checklist
[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked