I am writing a bash script where I need to find out the process user id. For example, let the process be bash itself.
I tried ps aux | grep ba[s]h, but the following was returned:
1000 2745 0.0 0.1 28360 5440 pts/1 Ss 10:11 0:01 bash
I see userID 1000, but I need a username.
user2897690
source
share