List all running processes with a snapshot view:
ps aux # all processes, BSD-style output
ps -ef # all processes, full-format output
ps aux | grep nginx # filter for a specific program
For a live, updating view of resource usage use top or the more user-friendly htop:
top
htop # install first: sudo apt install htop
Send signals to processes with kill. The default signal is SIGTERM (15), which asks the process to exit gracefully. SIGKILL (9) forces immediate termination:
kill 1234 # send SIGTERM to PID 1234
kill -9 1234 # force-kill PID 1234
killall nginx # send SIGTERM to all processes named nginx
pkill -f "python3 manage.py" # match by command line pattern
Run a process in the background with &, bring it back with fg, and suspend it with Ctrl+Z:
long_running_command &
jobs # list background jobs
fg %1 # bring job 1 to foreground