ps command
List running processes.
- Processes & services
- Package procps
- 7 options · 7 examples
On this page
Syntax
ps [options]Provided by the procps package. Run man ps for the full manual.
Common options
| Option | What it does |
|---|---|
aux | Every process with user, CPU and memory (BSD style) |
-ef | Every process, full format |
-u USER | Processes of a user |
-p PID | One process |
--sort=-%mem | Sort by memory, highest first |
-o FIELDS | Choose columns |
--forest | Show the process tree |
Examples
All processes
ps auxFind a process by name
ps aux | grep nginxTop memory users
ps aux --sort=-%mem | headTop CPU users
ps aux --sort=-%cpu | headProcesses of a user
ps -u www-dataCustom columns
ps -eo pid,user,%cpu,%mem,cmd --sort=-%cpu | headProcess tree
ps -ef --forest
No example matches. Check the options table or search the guides.
