Groups are one of the permission mechanisms on UNIX. And by default, all real (and imaginary) IDs belong to some group which is defined in the password file. But it is possible for any user, to belong to more than one group (at the discretion of the system administrator). The newgrp and sg commands are the mechanism by which a user changes his active group among all the groups he/she is belongs to. The sg command is used to just perform a single command under the new group. Either command without an argument of what group to change to, changes the group to the one listed in the password file.