id
id功能说明:显示用户的ID,以及所属群组的ID。
语 法:id [-gGnru][--help][--version][用户名称]
补充说明:id会显示用户以及所属群组的实际与有效ID。若两个ID相同,则仅显示实际ID。若仅指定用户名称,则显示目前用户的ID。
参 数:
-g或--group 显示用户所属群组的ID。
-G或--groups 显示用户所属附加群组的ID。
-n或--name 显示用户,所属群组或附加群组的名称。
-r或--real 显示实际ID。
-u或--user 显示用户ID。
-help 显示帮助。
-version 显示版本信息。
id
id [options] [username]
Display information about yourself or another user: user ID, group ID, effective user ID and group ID if relevant, and additional group IDs.
Options
Print group ID only.
Print supplementary groups only.
With -u, -g, or -G, print user or group name, not number.
With -u, -g, or -G, print real, not effective, user ID or group ID.
Print user ID only.
Print help message and then exit.
Print version information.