The title says it all. What command I need to run from a terminal to find my user ID (UID)?
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.
This will return your user ID, group ID, and all your groups.
Try also :
getent passwd username
This will display user id , group id and home directory .
grep username /etc/passwd
You can use