L Lê Minh Member Jan 12, 2022 #1 How do you get UID of a user? Answer There are a couple of ways: Using the id command you can get the real and effective user and group IDs. id -u <username> If no username is supplied to id , it will default to the current user. Using the enviroment variable. echo $UID.
How do you get UID of a user? Answer There are a couple of ways: Using the id command you can get the real and effective user and group IDs. id -u <username> If no username is supplied to id , it will default to the current user. Using the enviroment variable. echo $UID.