Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The default output of the ps command can be overwhelmingly verbose, making it difficult to quickly find specific process information like PID, user, or command name.
The Solution: Pipe the output of ps aux to awk to select and format only the columns you need.
ps aux | awk '{print $1, $2, $11}'
Why it works: awk processes the output line by line and allows you to specify which fields (columns) to print. In this case, it prints the User (1st field), PID (2nd field), and the Command (11th field).
Pro-Tip: You can easily modify the field numbers within the awk command to display any combination of columns from the ps output, for example, ps aux | awk '{print $1, $2, $4, $11}' to also include CPU usage.
Linux Tips & Tricks | © ngelinux.com | 5/15/2026
