功能说明:显示用户的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显示版本信息。
#p#
NAME
id - print real and effective UIDs and GIDs
SYNOPSIS
id [OPTION]... [USERNAME]
DESCRIPTION
Print information for USERNAME, or the current user.
- -a
- ignore, for compatibility with other versions
- -Z, --context
- print only the security context
- -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
- --help
- display this help and exit
- --version
- output version information and exit
Without any OPTION, print some useful set of identified information.
AUTHOR
Written by Arnold Robbins and David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
The full documentation for id is maintained as a Texinfo manual. If the info and id programs are properly installed at your site, the command
- info coreutils id
should give you access to the complete manual.