1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/ps.md

33 lines
707 B
Markdown
Raw Normal View History

2013-12-08 19:56:16 +11:00
# ps
> Information about running processes.
> More information: <https://manned.org/ps>.
2013-12-08 19:56:16 +11:00
- List all running processes:
2013-12-08 19:56:16 +11:00
`ps aux`
- List all running processes including the full command string:
`ps auxww`
2014-03-24 00:52:15 +01:00
- Search for a process that matches a string (the brackets will prevent `grep` from matching itself):
2014-03-24 00:52:15 +01:00
`ps aux | grep {{[s]tring}}`
2017-11-23 13:01:50 +01:00
- List all processes of the current user in extra full format:
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) -F`
2017-11-24 12:50:38 +01:00
- List all processes of the current user as a tree:
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) f`
2018-01-15 22:36:37 +01:00
- Get the parent PID of a process:
2018-01-15 22:36:37 +01:00
`ps {{[-o|--format]}} ppid= {{[-p|--pid]}} {{pid}}`
2020-07-28 16:34:12 +02:00
- Sort processes by memory consumption:
`ps {{[k|--sort]}} size`