What's running right now?
ps snapshots the process table. There are two flag dialects — BSD (no dash, like ps aux) and SysV (dashes, like ps -ef). On macOS both work; pick the form that's clearer to you and stick with it.
The combos you'll wear out
ps aux— every process, all users, full command line. The defaultpsview.ps -ef— same idea, SysV style.ps -p <pid>— info about one PID.ps aux | grep -i firefox | grep -v grep— find by name. The-v grephides grep itself.ps -o pid,ppid,command— pick exactly the columns you want.
The columns you'll care about
USER— process owner.PID— the unique number you'llkill.%CPU,%MEM— instantaneous load.RSS— resident memory in KB.STAT— state (R running, S sleep, Z zombie, T stopped, ...).COMMAND— the executable + args. Truncated unless you expand the column.
Pgrep / pkill — find or kill by name
pgrep firefox prints the PIDs. pkill -f 'python myscript' kills every process whose full command matches. Way cleaner than the grep dance.