How do you view running processes in Linux?

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.