ps

List processes

What it does

ps aux lists every process on the system: the user, the PID (process ID), CPU and memory use, the start time and the command. The letters go without a dash: an old BSD style of flags.

The list is long, so you filter it: ps aux | grep nginx. The grep itself shows up in the result, and that is normal. pgrep -a nginx does the same more briefly, printing just the PID and the command.

Syntax

ps aux
ps aux | grep <name>
pgrep -a <name>

Examples

Related commands

Practise · All commands