Taming `ps` Output: Focused Process Info with `awk`
Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The output of the ps command can be overwhelmingly verbose, making it difficult to quickly find specific information about running processes.
The Solution: You can pipe the output of ps to awk to filter and format it precisely to your needs.
ps aux | awk '{print $1, $2, $11}'
Why it works: This command uses awk to print only the username (column 1), PID (column 2), and command (column 11) from the ps aux output, significantly reducing clutter and highlighting key process details.
Pro-Tip: To see only processes owned by the current user, add the condition $1 == ENVIRON["USER"] within the awk command: ps aux | awk -v user=$USER '$1 == user {print $2, $11}'
Linux Tips & Tricks | © ngelinux.com | 5/12/2026
