Processes

Processes: What's Running: ps, top and htop, Stopping Things: kill and Signals.

Updated

  1. What's Running: ps, top and htop (Apprentice): Every running program is a process with a number, its PID: ps lists the ones in your terminal, ps aux lists every one on the computer, ps aux --sort=-%cpu puts the busiest first, and top and htop show the same list live.
  2. Stopping Things: kill and Signals (Journeyman): kill sends a process a signal: plain kill sends TERM, a polite request to finish up and stop; kill -KILL ends a process that ignores it; pgrep -af and pkill -f find and stop processes by name; and Ctrl+C sends INT to the program in front of you.