Process Management

Summary

This note is a quick reference for checking and controlling running processes. These commands are especially useful when a program is stuck, consuming resources, or needs to be identified before you inspect logs or restart a service.

Commands

CommandPurpose
ps auxshow running processes in a detailed list
topshow live process activity
htopshow an interactive live process viewer
kill <PID>send a signal to a process by process ID
kill -9 <PID>force-kill a process that does not stop normally

Example usage

ps aux | grep ssh
top
kill 1234

Notes

  • ps aux is good for quick inspection and searching
  • top and htop are better when you need live monitoring
  • kill -9 is powerful, but it should not be your first choice unless a normal stop fails