check which groups a user belongs to linux code example
Example: how to check user in group linux
# to see the group joined by current user
$ id
groups
groups {USERNAME}
groups vivek
# to see the group joined by current user
$ id
groups
groups {USERNAME}
groups vivek