12

I know when you type sudo ps ax, that list all of the running process on the system. But want to know what is ax? what ax stand for? Is that abbreviation ?

21

This is what the man page says:

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.

In simpler words, option 'a' instructs 'ps' to list the processes of all users on the system rather than just those of the current user. Similarly, the 'x' option includes processes that are not running in a terminal, such as daemon processes. So that is why all the processes in the system are listed. You can also use

ps axu

which is better formatted according to the user.

1
  • 1
    So is it possible to say that ps ax has the same effect as ps -ax without the -? – Joshua Detwiler Jun 27 '18 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.