how to check user belongs to sudo group or not in linux code example Example: show users in sudo group grep -Po '^sudo.+:\K.*$' /etc/group