OnCallReady

Commands

ps - report a snapshot of the current processes

ps [aux] [-ef] [-eo FORMAT] [--sort KEY]

Options you will use

aux
BSD syntax: every process, with user and TTY-less ones included.
-ef
UNIX syntax: every process, full format (shows PPID).
-e
Select all processes.
-o FORMAT
Pick your own columns: pid,ppid,user,rss,vsz,stat,etime,comm,args. A trailing = drops the header.
-p PID
Only these PIDs.
--sort KEY
Sort by a column; prefix with - for descending (--sort=-rss).
-f, --forest
Show the process hierarchy.
--no-headers
Print no header line.
--ppid PID
Only the children of this parent PID.
-a
All processes with a terminal, except session leaders.
-C NAME
Only processes whose command name is NAME.
-L
Show threads, one line each (LWP column).
-u USER
Only processes of this (effective) user.

Examples

$ ps -eo pid,user,rss,comm --sort=-rss | head

biggest memory consumers

$ ps -p $$ -o ppid=

what launched your shell

$ ps -p 1 -o comm=

systemd

Gotchas

Taught in

Try ps in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.