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 herenothing runs on your computer
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
| Option | What it does |
|---|---|
aux | every process, with owner, CPU and memory (BSD style, no dash) |
-ef | every process, with the parent's PID (PPID) |
| grep NAME | find a process by name |
Good to know
ps aux | grep nodealso 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.