Skip to content

ps

Report a snapshot of the current processes (https://man7.org/linux/man-pages/man1/ps.1.html)

To check ps version

ps --version

To list every process on the system

ps aux

To list a process tree

ps axjf

To list every process owned by a specific user

ps -u <user>

To list every process with a user-defined custom format

ps -eo pid,user,command

To search for processes matching a name without including grep in the output

ps aux | grep '[<first_char>]<remaining_chars>'

To list processes sorted by CPU usage

ps aux --sort=-%cpu

To list processes sorted by memory usage

ps aux --sort=-%mem

To show top 10 CPU-consuming processes

ps aux --sort=-%cpu | head -n 11

To find processes by name

ps -fC <process_name>

To show threads of a specific process

ps -T -p <pid>