In Linux, the id command helps you uncover both user and group names, along with their corresponding numeric IDs, UID and group ID. You can use this command to extract your user details, specific user’s UID, user’s UID and groups, user’s group list and your security context.
ID command Examples:
How to print your own id:
Open the terminal (ctrl+alt+t) application and run below command.
id
How to find specific users id:
Example: To find my (username:manikandan) UID, run below command.
id -u manikandan
How to find specific users GID:
id -g manikandan
How to find all the groups a user belongs to:
id -G manikandan
For the complete usage details, run below commands.
man id
id --help