I know, we can get the PIDs of all the running processes using,
ps ax | awk '{print $1}'
I want to know 2 things,
1. Is it a best way? (If not then what is the best way to get it?)
2. Will it work on all the distribution of Linux? (Ex. Ubuntu, RHEL, SLES, etc etc)