linux check group for user 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