2013-12-08 19:56:16 +11:00
|
|
|
# ps
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Information about running processes.
|
2021-10-06 14:51:52 -07:00
|
|
|
> More information: <https://manned.org/ps>.
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- List all running processes:
|
2013-12-08 19:56:16 +11:00
|
|
|
|
|
|
|
`ps aux`
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 12:36:05 -08:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- List all running processes including the full command string:
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 12:36:05 -08:00
|
|
|
|
|
|
|
`ps auxww`
|
2014-03-24 00:52:15 +01:00
|
|
|
|
2024-04-24 21:02:07 +02: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
|
|
|
|
2024-04-24 21:02:07 +02:00
|
|
|
`ps aux | grep {{[s]tring}}`
|
2017-11-23 12:53:54 +01:00
|
|
|
|
2017-11-23 13:01:50 +01:00
|
|
|
- List all processes of the current user in extra full format:
|
2017-11-23 12:53:54 +01:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) -F`
|
2017-11-23 12:53:54 +01:00
|
|
|
|
2017-11-24 12:50:38 +01:00
|
|
|
- List all processes of the current user as a tree:
|
2017-11-23 12:53:54 +01:00
|
|
|
|
2025-03-19 00:36:34 +02:00
|
|
|
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) f`
|
2018-01-15 22:36:37 +01:00
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Get the parent PID of a process:
|
2018-01-15 22:36:37 +01:00
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`ps {{[-o|--format]}} ppid= {{[-p|--pid]}} {{pid}}`
|
2020-07-28 16:34:12 +02:00
|
|
|
|
|
|
|
- Sort processes by memory consumption:
|
|
|
|
|
man, sudo, mount, file, curl, ps, seq, gdb, cat, upower, cal: add option placeholders (#15915)
2025-03-11 08:07:57 +02:00
|
|
|
`ps {{[k|--sort]}} size`
|