

The format of the display will also be different based on which type of option you use! I wish the Linux ps did not have so much backward compatibility and was as simple as the OpenBSD ps. ps that ships with Linux is super-confusing to use because it supports three types of arguments: Unix options ( -u), BSD options ( x) and GNU options ( -pid). Ps is the classic Unix/Linux command to list processes and their details.
PS EF COMMAND IN UNIX ARCHIVE
So both are valid commands but they are not showing the same information.📅 2016-Sep-27 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cheatsheet, ps ⬩ 📚 Archive Will be considered identical to Z and so on. Not considered when options are described as being "identical" below, so -M On other terminals (TTYs) that are owned by you alternately, this may beĭescribed as setting the selection to be the set of all processes filtered toĮxclude processes owned by other users or not on a terminal. The use ofīSD-style options will also change the process selection to include processes You can override this with the PS_FORMAT environment variable. The use of BSD-style options will add process state (stat=STAT) to the defaultĭisplay and show the command args (args=COMMAND) instead of the executable
PS EF COMMAND IN UNIX MANUAL
So the 1st method ( ps ef) is BSD style and the manual page goes on with This version of ps accepts several kinds of options:ġ UNIX options, which may be grouped and must be preceded by a dash.Ģ BSD options, which may be grouped and must not be used with a dash.

See man ps (the one on your system, on-line can have different explanations). To see every process on the system using BSD syntax:

To see every process on the system using standard syntax: Which should you use? What do you want to do with the output?Īlso, see the EXAMPLES section (which does list -ef rather prominently, and doesn't use the BSD e option at all): EXAMPLES Processes owned by other users or not on a terminal. The selection to be the set of all processes filtered to exclude That are owned by you alternately, this may be described as setting The process selection to include processes on other terminals (TTYs) The use of BSD-style options will also change You can override this with the PS_FORMATĮnvironment variable. The default display and show the command args (args=COMMAND) instead The use of BSD-style options will add process state (stat=STAT) to Hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD).

It displays the process ID (pid=PID), the terminalĪssociated with the process (tname=TTY), the cumulated CPU time in (euid=EUID) as the current user and associated with the same terminalĪs the invoker.
PS EF COMMAND IN UNIX PLUS
See the c option, the format keyword args, andĮ Show the environment after the command.Ĭlearly, you're not selecting all processes using the ef options, but are using the default listing of processes, plus some additional formatting: By default, ps selects all processes with the same effective user ID L, the NLWP (number of threads) and LWP (thread ID) columns It alsoĬauses the command arguments to be printed. Other UNIX-style options to add additional columns. These are different (sections SIMPLE PROCESS SELECTION, OUTPUT FORMAT CONTROL and OUTPUT MODIFIERS respectively): -e Select all processes. So, ef uses the BSD e and f options, and -ef uses the Unix -e and -f options. Man ps says: This version of ps accepts several kinds of options:ġ UNIX options, which may be grouped and must be preceded by aĢ BSD options, which may be grouped and must not be used with aģ GNU long options, which are preceded by two dashes.
