Example Uses of the Command 'ps'

The 'ps' utility reveals active processes on the computer

The ps command in Linux displays to the standard output a summary of currently active processes on the machine.

Command and Switches

PS command

The ps command supports several switches that modify its execution.

  • -A, -e: All processes
  • -a: All with TTYs (except session leaders)
  • a: All with TTYs (including other users)
  • -d: All except session leaders
  • -N, --deselect: Negate selection
  • r: Only show the running processes
  • T: All processes only on this terminal
  • x: Processes, but without the controlling TTYs

Uses of the 'ps' Command

One value to running ps -ax is that you'll see the process ID of every command and program currently active on the computer. If you're dealing with a runaway process that's consuming too many resources, use the process ID to kill the program with something like:

kill -9 [pid]