How do you view running processes in Linux?

Why Interviewers Ask This

This is a classic screening question for Linux / Shell Scripting roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.

Answer

ps aux shows a snapshot of all running processes with CPU%, memory%, PID, and command. ps aux | grep processname filters for a specific process. top provides a real-time dynamic view of processes sorted by CPU usage — press M to sort by memory, k to kill a process by PID. htop (if installed) is a more user-friendly interactive version of top with color and mouse support. pgrep processname returns the PID of matching processes. pstree shows processes in a tree hierarchy.

Common Mistake

Don't just define the term — demonstrate that you understand when to use it and when not to. Showing awareness of trade-offs is what separates average from strong Linux / Shell Scripting candidates.