ps – Report Process Status
The ps command displays information about active processes running on the system. It is useful for monitoring and managing processes.
Syntax
ps [OPTIONS]
Options
| Option | Description |
|---|---|
-e or -A |
Show all processes |
-f |
Full-format listing (more detailed info) |
-u USER |
Show processes for a specific user |
-x |
Show processes not attached to a terminal |
-aux |
BSD-style option showing all processes with user and more info (common usage) |
--sort |
Sort output by a specified field (e.g., %mem, %cpu) |
Practical Examples
1. Show all processes
ps -e
2. Show detailed info for all processes
ps -ef
3. Show all processes with BSD syntax (popular)
ps aux
4. Show processes for a specific user
ps -u username
5. Show processes sorted by memory usage
ps aux --sort=-%mem
6. Show processes with their parent-child relationships
ps -ejH
Tips
- Combine
pswithgrepto find specific processes, e.g.:
ps aux | grep firefox
-
For dynamic, real-time process monitoring, consider using
toporhtop. -
Use
man psfor detailed info on all options.
See Also
top– interactive process viewerhtop– enhanced interactive process viewerkill– send signals to processespgrep– find process IDs based on name or other attributes
Summary
ps is an essential tool for viewing and managing system processes. Its various options allow you to customize output and filter for specific needs.