Mastering `ps` Output with `awk` for Focused Process Info
Quick Tip
Mastering `ps` Output with `awk` for Focused Process Info
Challenge: The default output of the `ps` command can be overwhelming, often displaying more information than you need, making it difficult to quickly identify specific processes or resource usage patterns.
The Solution: You can leverage the power of `awk` to filter and format the output of `ps` to show exactly what you’re looking for.
ps aux | awk '{print $1, $2, $11}'
Why it works: This command pipes the output of `ps aux` (which shows all processes for all users in a detailed format) to `awk`. `awk` then processes each line, printing only the fields corresponding to the User (column 1), PID (column 2), and the Command Name (column 11), giving you a cleaner view.
Pro-Tip: To see the full command including arguments, use `$0` instead of `$11` in the `awk` command: ps aux | awk '{print $1, $2, $0}'.
Linux Tips & Tricks | © ngelinux.com | 5/30/2026
