Taming `ps` Output: Focused Process Info with `awk`

Quick Tip

Taming `ps` Output: Focused Process Info with `awk`

Challenge: The default output of the ps command can be overwhelming, displaying a lot of information about running processes that you might not always need. It’s difficult to quickly sift through and find specific details.

The Solution: Combine ps with awk to precisely select and format the process information you want to see.

ps aux | awk '{print $1 "\t" $2 "\t" $11}'

Why it works: ps aux provides a comprehensive list of processes. awk then acts as a powerful text processor, allowing us to specify which columns (fields) to print. In this example, we’re selecting the username (field 1), PID (field 2), and command name (field 11), separated by tabs for readability.

Pro-Tip: To see only processes owned by the current user, add grep "^$USER" before the awk command, or use ps -u $USER as the initial command before piping to awk.

Linux Tips & Tricks | © ngelinux.com | 6/23/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted