id - print real and effective user and group IDs
| Use Case | Command | Description |
|---|---|---|
| π Show current user info | id | Display user ID, group ID, and supplementary groups |
| π€ Show only user ID | id -u | Print effective user ID number |
| π₯ Show only group ID | id -g | Print effective group ID number |
| π List all group IDs | id -G | Print all group IDs (spaceβseparated) |
| π·οΈ Show names instead of numbers | id -n | Combined with -u, -g, or -G to get names |
| π― Show real ID instead of effective | id -r | Use with -u, -g, or -G |
| π€ Get username only | id -un | Print the username of the current user |
| π₯ Get group name only | id -gn | Print the group name of the current user |
| π List all group names | id -Gn | Print all group names (spaceβseparated) |
| π Show security context | id -Z | Print SELinux security context (if available) |
| 0οΈβ£ Use NUL delimiter | id -z | Output entries separated by NUL, useful for scripting |
| βΉοΈ Check another user | id username | Show info for specified user |
id [OPTION]... [USER]...
Print user and group information for each specified USER, or (when USER omitted) for the current user.
-a β π ignore, for compatibility with other versions-Z, --context β π print only the security context of the process-g, --group β π₯ print only the effective group ID-G, --groups β π print all group IDs-n, --name β π·οΈ print a name instead of a number, for -ugG-r, --real β π― print the real ID instead of the effective ID, with -ugG-u, --user β π€ print only the effective user ID-z, --zero β 0οΈβ£ delimit entries with NUL characters, not whitespace; not permitted in default format--help β βΉοΈ display this help and exit--version β π¦ output version information and exitWithout any OPTION, print some useful set of identified information.
Written by Arnold Robbins and David MacKenzie.
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>
Copyright Β© 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Full documentation <https://www.gnu.org/software/coreutils/id>
or available locally via: info '(coreutils) id invocation'
GNU coreutils 8.32 January 2026
Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 01:16 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format