De man ps
, a página de manual do comando ps
(apenas trechos):
a Lift the BSD-style "only yourself" restriction, which is imposed
upon the set of all processes when some BSD-style (without "-")
options are used or when the ps personality setting is BSD-like.
The set of processes selected in this manner is in addition to
the set of processes selected by other means. An alternate
description is that this option causes ps to list all processes
with a terminal (tty), or to list all processes when used
together with the x option.
x Lift the BSD-style "must have a tty" restriction, which is
imposed upon the set of all processes when some BSD-style
(without "-") options are used or when the ps personality
setting is BSD-like. The set of processes selected in this
manner is in addition to the set of processes selected by other
means. An alternate description is that this option causes ps
to list all processes owned by you (same EUID as ps), or to list
all processes when used together with the a option.
u Display user-oriented format.
Portanto, o argumento a
permite que ps
mostre processos de todos os usuários em vez de apenas o usuário atual, se os processos estiverem conectados a um terminal.
O x
torna ps
também inclui processos que não estão conectados a nenhum terminal na lista. Portanto, o ax
juntos faz com que ps
liste todos os processos sem restrição.
O u
simplesmente altera a formatação de saída e as colunas visíveis.
Como @steeldriver mencionou corretamente em seu comentário, ps
é um pouco especial porque suporta os dois argumentos no estilo BSD ( a
) e no estilo GNU ( -a
). Portanto, ps aux
não é exatamente o mesmo que ps -aux
, embora possa ser implementado para fazer o mesmo para facilitar a migração. O parágrafo relevante da página man diz:
Note that "ps -aux" is distinct from "ps aux". The POSIX and UNIX
standards require that "ps -aux" print all processes owned by a user
named "x", as well as printing all processes that would be selected by
the -a option. If the user named "x" does not exist, this ps may
interpret the command as "ps aux" instead and print a warning. This
behavior is intended to aid in transitioning old scripts and habits.
It is fragile, subject to change, and thus should not be relied upon.