Find the user and group for each running processes – Ubuntu

This is a handy snippet. If you need to quickly figure out which user is running what process in the system.

ps ax -o euser,egroup,comm

For example: To find the user running Apache2 in Ubuntu, run the following command:

ps ax -o euser,egroup,comm | grep apache2