Id

The id command prints the UID and GIDs for a given user, or the process invoking the command, if no user is given. On SELinux id displays also the security context.

Examples
$ id uid=500(robot) gid=500(hive) groups=500(hive)

Prints the process's UID, GID, and supplementary GIDs. $ id robot uid=500(robot) gid=500(hive) groups=500(hive),501(dockingbay),502(command)

Print the user's UID, GID, and supplementary GIDs.

context=root:system_r:unconfined_t:SystemLow-SystemHigh
 * 1) id -Z

Prints the security context for current user.

Provided by
Most (all?) Linux distributions incorporate this from the GNU Coreutils: and use its man page

Related Commands
All of these relate to user information.
 * logname - show the login name.
 * whoami - show effective user ID.
 * groups - show groups of the current user.
 * users - show who is logged in.
 * who - show who is logged in from where.