ps on Its Own
ps
PID TTY TIME CMD
4211 pts/0 00:00:00 bash
4380 pts/0 00:00:00 psWithout options, ps lists only the processes of your current terminal. On Ubuntu, Debian, AlmaLinux, and Rocky Linux, ps comes from the procps package, so the options below are the same everywhere.
ps aux: Every Process
ps aux | head -5| Column | Meaning |
|---|---|
| USER | Owner |
| PID | Process ID |
| %CPU | CPU share, lifetime average |
| %MEM | Share of physical memory |
| VSZ | Virtual memory, KiB |
| RSS | Memory in RAM, KiB |
| TTY | Terminal, ? if none |
| STAT | State, see below |
| START | Start time |
| TIME | CPU time used |
| COMMAND | Command line |
%CPU is averaged over the life of the process, so a busy moment hardly shows; for live values use the top command. RSS counts shared libraries in every process that uses them, so adding up the column overstates memory use.
ps -ef and Parent PIDs
ps -ef | head -5The columns are UID, PID, PPID, C, STIME, TTY, TIME, and CMD. PPID is the parent process ID, which tells you what started a process. To see the parent of one process, run ps -o ppid= -p 1234. A process whose parent is PID 1 was started by systemd or was left behind by a parent that exited.
Two Option Styles
ps accepts BSD-style options without a dash (aux), UNIX-style options with a dash (-ef), and long options (--sort). Both styles list every process; they differ in the columns. Write aux without a dash: with a dash, ps may read it as a request for a user named "x".
Sort and Choose Columns
ps aux --sort=-%mem | head -10
ps -eo pid,user,%cpu,%mem,etime,cmd --sort=-%cpu | headA minus sign before the sort key means largest first. -o names the columns you want; etime is the time since the process started. An equals sign after a column name hides the header, which helps in scripts: ps -o pid= -C nginx.
Filter by User or Name
ps -u www-data
ps -f -C nginx
pgrep -a nginx-u selects a user and -C a command name. ps aux | grep nginx also works but lists the grep process itself; pgrep avoids that and prints the PID with the full command line. More ways to list processes are in how to list processes in Linux.
Process Tree and Threads
ps -ef --forest
ps -eLf | head
ps -o nlwp= -p 1234--forest draws each process under its parent. -L prints one line per thread, with the thread ID in the LWP column, and nlwp gives the number of threads of one process.
Process States
| Code | State |
|---|---|
R | Running or ready |
S | Sleeping, waiting |
D | Waiting on I/O, uninterruptible |
T | Stopped |
Z | Zombie |
I | Idle kernel thread |
Extra characters follow the letter: < high priority, N low priority, s session leader, l multithreaded, + in the foreground. Many processes in D point to slow storage; see how to check disk I/O in Linux. A zombie has finished and holds only an entry in the process table, but its parent has not collected its exit status; restarting the parent clears it.
From ps to Action
Once you have the PID, how to kill a process in Linux shows how to stop it safely. If the process belongs to a service, stop it with systemctl instead, or systemd may start it again.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations