id(version redhat 9.0)
syntax
id options username
description:
pring a real and effective UIDs and GIDs
frequence parameters -a all -g --group print a real effective GID -u --user pring only the effective UID -n --name print a name instead of a number -G,--groups print all group IDs (same as g) -r,--real print the real ID instead of the effective ID -u,--user print only the effective user ID --help display this help and exit exit --version output version information and exit
example1:
$id -g
500
$id -gn
zhang
$id -nu
zhang
$id -ru
500
$id -rg
501
$id -a ye
uid=501(ye) gid=502(ye) groups=502(ye)
$id ye
uid=501(ye) gid=502(ye) groups=502(ye)
$id -u ye
501