ODOC: id

id – Print real & effective UIDs and GIDs

Summary :

It prints the user’s info like user id, group id, user name, etc.,

Example:

$ id — Print UID, GID, Groups.

$ id -r — Print only the real user ID.

$ id -u — print only the effective user ID

$ id -nu — Print only user name.

$ id -g — print only the effective group ID.

$ id -ng — Print only group name.

$ id -G — Print all group IDs

$ id -nG — Print all groups name.

$ id user1 — Print info abt user1.

NOTE:
Real UID is the UID of the user, who created. Effective UID is used to evaluate privileges of the process to perform a particular action.

Read : man id

id, odoc, linux, gnu/linux