Commands · Command

CommandLinuxmacOS

ps

ps [options]

Lists currently running processes — a snapshot at the moment the command runs, unlike top's live view.

// FLAGS

auxBSD-style — all processes, all users, full details (the most common invocation)
-efSystem V-style equivalent
--sortsort output by a given field

// EXAMPLE

ps aux | grep nginx — lists all processes and filters down to the ones matching "nginx."

// GOTCHA

ps aux and ps -ef show nearly identical info but come from two different historical option styles (BSD vs. System V) — mixing their syntax (like ps -aux) technically runs on Linux but means something subtly different than intended on some systems.

// RELATED COMMANDS