On linux, processes can be listed by command "ps aux", but what if i want to list only process ids one per line?

These commands worked for me:

ps -A -o pid
ps aux | awk '{print $2}'
to count number of processes just add "| wc -l" after before mentioned commands. Do you know other ways to show the pid list on linux?

Similar: List paths of all running processes