Quick Tip
Supercharge Your `ps` Output with Custom `awk` Formatting
Challenge: The default `ps` command output can be verbose and sometimes lacks the specific columns you need for quick process monitoring or analysis.
The Solution: Use `awk` to precisely select and format the output of `ps` to display only the essential information you require.
ps aux | awk '{print $1 "\t" $2 "\t" $11}'
Why it works: The `ps aux` command lists all running processes with user, PID, and command details. `awk` then processes this output line by line, printing specific fields (User, PID, and Command in this example) separated by tabs for a cleaner, more focused view.
Pro-Tip: To see CPU and memory usage as well, try: ps aux | awk '{print $1 "\t" $2 "\t" $3 "\t" $4 "\t" $11}'
Linux Tips & Tricks | © ngelinux.com | 4/27/2026
