This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
ps
¶
ps
(process status) is a program that displays the currently running processes. A related Unix
utility named top
provides a real-time view of the running processes.
Table of contents¶
Use¶
Reference(s)
-
Print all processes:
-
Print all processes with more details (additional columns):
-
Print processes with custom columns (see "STANDARD FORMAT SPECIFIERS" section of
$ man ps
for more column header to display): -
Print processes owned by a user:
-
Print processes by "exact" name, an "exact" process name is needed (no partial name or wildcard), e.g.
sshd
: -
Print processes by "partial" name, to search the process list more flexibly:
-
Print processes by process id:
-
Print the 10 processes that have the biggest CPU usage:
-
Print processes by memory usage:
-
Print processes hierarchy in a tree style:
-
Print the threads of a process, e.g. threads of process id 3150:
-
Print all processes owned by you:
-
Print all processes associated with current terminal:
-
Print all processes associated with a terminal:
-
Print all processes NOT associated with a terminal (negation command):
If this cheat sheet has been useful to you, then please consider leaving a star here.