what is the meaning of ax in ps ax

Solution 1:

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.