Lesson 12 / 29

Viewing Processes

ps and top show what's running.

Every running program is a process

Each running program gets a unique PID (process ID). The kernel tracks CPU time, memory, and state for every process.

ps aux — a snapshot

ps aux lists all running processes with their PID, CPU%, memory%, and command.

ps aux | head -3

Output:

USER  PID %CPU %MEM COMMAND
root    1  0.0  0.1 /sbin/init
alice 842  0.2  1.3 nginx

top — a live view

top refreshes continuously, showing the busiest processes first. Press q to exit.

top