How to list and stop processes
Overview
Every running program is a process with a process ID (PID). First identify the correct process, then request a graceful stop before forcing termination.
Examples
ps aux
ps aux | grep firefox
top
kill 1234
pkill -x firefox
kill -9 1234
Commands and signals
ps auxtakes a snapshot of all users' processestopgives an updating view; pressqto quitkill PIDsends SIGTERM, allowing cleanuppkill -x nametargets an exact process namekill -9 PIDsends SIGKILL and should be a last resort
Safety
Verify the PID and owner before stopping anything. Killing desktop or system processes can lose unsaved work or destabilize the session.
Do not use sudo kill unless you understand why the process belongs to another user and why it must stop.