UnixDroid

Processes · Linux command

ps command in Linux

What does ps do?

ps shows the running processes. ps aux lists every process of every user with its CPU and memory use.

ps [options]

Most useful options

OptionWhat it does
auxall processes, all users, with details
-effull list (System V style)
--forestshow parent/child tree

ps examples

$ ps aux Try it ›

everything running

$ ps aux | grep nginx Try it ›

find one program

$ ps aux --sort=-%mem | head Try it ›

top memory users

In security work

Look for odd process names, processes run from /tmp, or reverse shells (bash -i) during incident response.

Questions about ps

How do I find the PID of a program?

ps aux | grep name, or pgrep name.