aux |
All processes of all users, with owner, CPU and memory (BSD syntax). |
ps aux |
-ef |
All processes in full format, with the parent PPID (UNIX syntax). |
ps -ef |
-u user |
Processes of the given user. |
ps -u student |
-p PID |
Only processes with these PIDs (comma-separated). |
ps -p 1,812 |
-C name |
Processes by program name. |
ps -C nginx |
-o fields |
A custom set of columns — pid, ppid, user, stat, %cpu, %mem, etime, cmd. |
ps -o pid,ppid,stat,cmd -p 1 |
--sort field |
Sort by a column; a minus sign sorts descending. |
ps aux --sort=-%mem |
--forest |
Draw the parent–child tree. |
ps -ef --forest |
ww |
Don't cut the command line to the window width. |
ps auxww |