Quick Tip
Master Process Monitoring with `ps` and `awk`
Challenge: You need to quickly find and analyze specific processes on your Linux system, but the standard `ps` output is often too verbose and difficult to parse for targeted information.
The Solution: Leverage the power of `awk` to filter and format the output of `ps` for precisely the information you need.
ps aux | awk '/[p]rocess_name/{print $1, $2, $11}'
Why it works: This command pipes the output of `ps aux` (which lists all running processes with detailed information) to `awk`. `awk` then filters lines containing your target “process_name” (the `[p]rocess_name` pattern is a common trick to avoid matching `awk` itself) and prints specific columns: the User (column 1), PID (column 2), and the Command (column 11).
Pro-Tip: For even more refined filtering, you can use `awk`’s conditional logic. For example, to find processes owned by a specific user: `ps aux | awk -v user=”your_username” ‘$1 == user {print $2, $11}’`
Linux Tips & Tricks | © ngelinux.com | 5/19/2026
