Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

Show user's group affiliation

Show user's group affiliation

To check which group a particular user belongs to, use the groups command.
If you run the command with no arguments, the group to which the user who executed the command belongs will be displayed.
If you specify the name of the user whose group you want to display as an argument, the group to which the user belongs will be displayed.

●Display the group to which the user who executed the command belongs.

[tama@Lion ~]$ whoami    ←Show user name
tama
[tama@Lion ~]$ groups  ←Show groups to which you belong
tama

●Display the group to which a specific user belongs.

[tama@Lion ~]$ groups nobody  ←Displays the group to which the "nobody" user belongs.
nobody : nobody
[tama@Lion ~]$
Copied title and URL