Is there any way to retrieve UID/GID of running process?
Currently, I know only way of looking it up in htop. But I don't want to depend on third-party tool, prefer to use builtin unix commands.
Could you suggest a few useful oneliners?
This didn't satisfy my curiousity:
How to programmatically retrieve the GID of a running process
top shows only user but not the group.
Best Answer
or
or with only bash builtins: