May
29
Get Username From UID in Unix
Posted by suvi under Other
Finding out the username by user id (uid) in Unix is not as common a task as determining the uid by a username, but if you need to do it – I’ll show you how.
How to find the username using user id (uid)
Simply use the getent command. Most common use for it is to query the passwd source for a username, like this:
Leave a Reply