Quick Tip
Taming `ps` Output: Focused Process Info with `awk`
Challenge: The `ps` command often produces verbose output, making it difficult to quickly find specific information about running processes. You might need to sift through many columns to find what you’re looking for.
The Solution: Combine `ps` with `awk` to filter and display only the columns you need for a concise overview of your processes.
ps aux | awk '{print $1, $2, $11}'
Why it works: `ps aux` provides a comprehensive list of running processes. `awk` then processes this output line by line, printing only the fields you specify (in this case, username, PID, and command name). You can adjust the numbers to select different columns from the `ps` output.
Pro-Tip: Use `ps -ef | awk ‘{print $2, $8}’` to quickly see PIDs and command names in a different format, or `ps aux | grep ‘your_process_name’` to filter for a specific process.
Linux Tips & Tricks | © ngelinux.com | 6/5/2026
