Id
Jump to navigation
Jump to search
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.
# id -Z context=root:system_r:unconfined_t:SystemLow-SystemHigh
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.
This article is a stub and needs to be finished. Plunge forward and help it grow!