Processes & Resources
Intermediate
Overview
A process is a running program identified by a PID. ps lists processes, and top (or htop) shows them live with CPU and memory usage.
Send signals to processes with kill. The default signal asks politely to stop (SIGTERM, 15); kill -9 forces termination (SIGKILL) and should be a last resort.
Append & to run a command in the background, and use jobs, fg, and bg to manage backgrounded work in your current shell.
Cheatsheet
ps auxList all processes with resource usageps aux | grep nginxFind a specific processtopLive view of processes (q to quit)kill 1234Gracefully stop PID 1234kill -9 1234Force kill PID 1234command &Run a command in the backgroundTry it
A safe, simulated terminal. Run the suggested commands to see typical output.
simulated terminal
Type a command and press Enter, or click a suggestion below to run it.
Quick quiz
1. Which signal does `kill -9` send?
2. How do you run a command in the background?