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 overwhelming, showing a lot of process information when you only need specific details like the command name and its PID.

The Solution: Combine `ps` with `awk` to filter and display only the columns you need.

ps aux | awk '{print $2, $11}'

Why it works: `ps aux` provides a comprehensive list of running processes, and `awk` then selects the second column (PID) and the eleventh column (command name), effectively filtering the output for clarity.

Pro-Tip: To see only processes owned by your current user, add grep "^$USER" before the awk command: ps aux | grep "^$USER" | awk '{print $2, $11}'

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted