ps

List every running program with its PID, owner, CPU and memory — and find one by name with ps aux | grep.

>_ Try it: a simulated Linux, right here
Loading the terminal…

Examples

  • ps aux
  • ps aux | grep node
  • ps -ef
  • ps aux | grep -v root
  • top

How it works

Every running program is a process with a number, its PID. ps alone shows only the ones in your terminal; ps aux shows every process on the machine.

The columns that matter most: USER (who runs it), PID (what you give to kill), %CPU and %MEM (how busy it is) and COMMAND (what it is).

Syntax

ps aux  |  ps -ef

Options

OptionWhat it does
auxevery process, with owner, CPU and memory (BSD style, no dash)
-efevery process, with the parent's PID (PPID)
| grep NAMEfind a process by name

Good to know

  • ps aux | grep node also lists the grep itself on a real machine; that line is harmless.
  • A process using ~100% CPU for a long time is a classic sign something is stuck: note its PID and try kill PID.