Frequently Asked Question

Why does ps have such weird command-line syntax?

ps is the oldest "show me the processes" command on Unix, and over the decades it grew two incompatible argument styles. The original AT&T System V ps used dashed options: ps -e for every process, ps -f for full format, ps -ef together for "everything, full". Berkeley's BSD ps instead used un-dashed letters: ps aux for every process from every user including those without a terminal. GNU ps on Linux accepts both, plus a third long-option style (--forest, --sort=…), and tries to guess which you meant from whether you typed a leading hyphen.

In practice, two invocations cover most needs: ps aux (BSD-style, gives you %CPU and %MEM columns that sysadmins reach for) and ps -ef (System V-style, gives you a clean PPID column and the full command). For a tree view, ps auxf or pstree. The historical baggage is annoying, but on Linux ps is otherwise just a formatter over /proc, so the underlying data is the same whichever syntax you pick.

Further reading and video