If you're a #Linux person and using the command "ps" with options like "aux" instead of e.g. "-e" (i.e. options without leading "-"), you likely learned the #Unix #commandline on #BSD or maybe SunOS 🧔. (Or by someone who grew up with them. 🙂)

In other news: #TIL that (in either variant) the option "j" (e.g. as "ps ajx" or "ps -ej") also shows the PPID (parent PID, only with BSD style options), PGID (process group ID) und SID (session ID).

#cli #commandlinemagic #ps #shellscripting

@xtaran `ps` is probably one of the wonkiest commands I use daily. Throughout all these years I have accrued options and I have settled for `ps faux`. I'm not really sure if I learned the options from someone else or if the dash-less options appear first on the manpage so I settled for those. And for the life of me, I don't know the variants it's compatible with or which one I'm using :)
@xtaran surely -ef is posix and auxw is a gnu-ism (reverse of what you said)?

@sej7278: According to the man page of ps:

To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu

@xtaran holy moly that's news to me, although I wonder if the manpage is wrong (not ubuntu is it?) as aux doesn't work on Solaris, hpux, tru64, macos etc I'm pretty sure

@sej7278: Debian Unstable in my case. ps(1) is in the procps package, i.e. not debian-specific.

And ps(1posix) (Debian package manpages-posix) only describes the options starting with a single "-" ("ps -ef" etc.)

I vaguely remember that I used "ps aux" already on SunOS (which was my first contact with Unix) as well as on FreeBSD (which I administrated for a while between 2003-ish and roughly the 2010s.

SunOS was more BSD like while Solaris was more SysV-like, so maybe I should remove Solaris.

@xtaran @sej7278 could be because they are SYSVs, pre-Solaris SunOS was of BSD lineage

@mirabilos @sej7278: The longer the more I think so. I removed "Solaris" from the original text.

I mostly used SunOS and used Solaris only for a short time at the very end of my studies and always found it rather odd compared to SunOS, NetBSD and Linux back then.

@xtaran @mirabilos oh now you made me fire up some solaris VM's, they definitely don't like aux, but macos is fine with it now
@sej7278 @xtaran yeah, OSX userland is mostly BSD-ish. Can you fire up pre-Solaris SunOS?
@mirabilos @sej7278: That SunOS box (and later a Solaris box) was at one of my first sysadmin jobs during my studies. I quit there when I left the university in 2001 for my first real job. And all my later Sun boxes ran Debian GNU/Linux. 🤓
@xtaran
And here I am often thinking, am I the only one using ps -fAH?
@xtaran ah. I mostly use ps ax -O ppid when I need it.