Quick Tip
Mastering `ps` Output: Focused Process Info with `awk`
Challenge: The default `ps` command outputs a lot of information about running processes, making it difficult to quickly find specific details like CPU usage, memory consumption, or the command itself.
The Solution: Combine `ps` with `awk` to filter and format the output, presenting only the most relevant columns.
ps aux | awk '{print $1, $2, $3, $4, $11}'
Why it works: The `ps aux` command provides a comprehensive snapshot of all running processes. `awk` then processes this output line by line, printing only the specified columns (user, PID, %CPU, %MEM, and command). You can adjust the column numbers to suit your needs.
Pro-Tip: Use `ps aux –sort=-%cpu | head -n 10` to quickly see the top 10 CPU-consuming processes without needing `awk`.
Linux Tips & Tricks | © ngelinux.com | 6/7/2026
