The content originates from the people's post and Telecommunications press "Linux command Application big dictionary"
tell 729 commands, 1935 examples
Learn about the Linux system's reference books, desk book, encountered the command or command not understand the options can be found
Strive to publish content every day
ID Command
use the ID command to display the UID of the user and the GID of the group to which the user belongs .
Command syntax:
ID [ options ] [ user name ]
The meanings of the options in the command are as follows is shown.
table ID command option meaning
Options |
Meaning |
-G |
that shows the primary group to which the user belongs. Gid |
-G |
Displays the group that the user belongs to. GID(both primary and secondary groups are listed) |
-U |
Show Users Uid |
Example : Queries the UID of user ab, the GID of the primary group, and the attribution group.
[[Email protected]~]# ID AB
uid=515 (AB) gid=517 (AB) Group =517 (AB), 518 (OU)
The UID of user ab is 515, the main group is AB, the GID of the main group is 517, the user belongs to ab and ou group
Example : Displays the GID of the primary group to which user ab belongs.
[[Email protected]~]# id-g AB
517
The GID that shows the main group that user ab belongs to is 517
Example : Displays the GID of the group to which user ab belongs.
[[Email protected]~]# id-g AB
517 518
The GID that shows user ab belongs to the group is 517 and 518
Example : Displays the UID of user ab.
[[Email protected]~]# id-u AB
515
Display user ab 's UID is 515
This article is from the "airfish2000" blog, make sure to keep this source http://airfish2000.blog.51cto.com/10829608/1874650
ID Command--linux command to apply a large dictionary 729 commands interpretation