What does aux mean in `ps aux`?

  • ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter aux using man ps.

    What does aux mean?

    BTW ps = process status

  • John1024

    John1024 Correct answer

    7 years ago

    a = show processes for all users
    u = display the process's user/owner
    x = also show processes not attached to a terminal

    By the way, man ps is a good resource.

    Historically, BSD and AT&T developed incompatible versions of ps. The options without a leading dash (as per the question) are the BSD style while those with a leading dash are AT&T Unix style. On top of this, Linux developed a version which supports both styles and then adds to it a third style with options that begin with double dashes.

    All (or nearly all) non-embedded Linux distributions use a variant of the procps suite. The above options are as defined in the procps ps man page.

    In the comments, you say you are using Apple MacOS (OSX, I presume). The OSX man page for ps is here and it shows support only for AT&T style.

    According to my manual page (MacOS), u means "Display the processes belonging to the specified usernames"

    @HowardGuo Are you sure that isn't `-u` as opposed to just `u`?

    @jordanm In this manual page, there is not any explained option without leading dash, I am afraid.

    @HowardGuo I have updated the answer to reflect the differences between the GNU (Linux) version of `ps` and the Apple OSX version. This question is currently tagged "Linux". If you are asking also about MacOS, you might want to update the tags.

    Thanks very much. I just checked manual page of ps in Linux and it has information regarding `aux`, MacOS' manual page does not have such information, it might be a document bug.

    OSX man page for `ps` does say "... `ps aux` still works as it did in Tiger" under "Legacy Description" section.

    @dev the whole paragraph reads: _The biggest change is in the interpretation of the -u option, which now displays processes belonging to the specified username(s). Thus, "ps -aux" will fail (unless you want to know about user "x"). As a convenience, however, "ps aux" still works as it did in Tiger._

    I have to object to the comment that "`man ps` is a good resource on mac OSX. The man page, only at the very end, notes that `ps aux` is maintained as a convenience, but there is absolutely no hint that options may be specified without leading hyphens before the end, the man page is long and richly complex, and a reader can spend a lot of time questioning his/her sanity before giving up and googling for this stackexchange question.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM