change group of the current user
Look up the group
- Use the following command to show all the groups to which you belong to.
$ groups
Change the group
- It is quite convenient to read, write and execute (d---rwx---) one document or folder by the setting of the same group within different users from distinct groups. The following command could set the main group of the current user. One user might hold several groups one time, if is necessary.
Add sub-group
- The following command could add a sub-group to the current user.
- -G : for sub-group (uppercase), several groups
- -g : for main group (lowercase), only one group