ps -ad output unexpected
Based on the manpage, I'd have expected ps -ad be an union of processes in ps -a and ps -d. But I actually get more processes than that, for example this one now shows up:
$ ps -a -d -o pid,sid,tty,user,command
PID SID TT USER COMMAND
199 199 hvc0 root /sbin/agetty -o -- \u --noreset --noclear --keep-baud 115200,57600,38400,9600 - vt220
It sounds like plain ps -a only picks processes by the invoking users (which itself doesn't seem to match the manpage?) and then adding -d is lifting that restriction from -a.