Streamline `ps` Output with Custom `awk` Formatting

Quick Tip

Streamline `ps` Output with Custom `awk` Formatting

Challenge: The standard output of the ps command can be verbose and difficult to parse when you’re looking for specific process information quickly.

The Solution: Use awk to format and filter the output of ps for precise information.

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

Why it works: This command lists all running processes (ps aux) and then pipes the output to awk, which prints only the User (column 1), PID (column 2), and Command (column 11) for each process, making it much cleaner.

Pro-Tip: You can easily add conditional filtering, for example, to find processes owned by a specific user: ps aux | awk '/myuser/ {print $1, $2, $11}'

Linux Tips & Tricks | © ngelinux.com | 5/13/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments