groups

命令功能:

显示用户所在组


补充说明:

groups命令在标准输入输出上输出指定用户所在组的组成员,每个用户属于/etc/passwd中指定的一个组和在/etc/group中指定的其他组


语法:

groups [option]...[username]...


命令实践:

[root@yubing tmp]# groups root

root : root bin daemon sys admdisk wheel

[root@yubing tmp]# groupsyubing

yubing : yubing

[root@yubing tmp]#