Previous Table of Contents Next


Module 61
groups

DESCRIPTION

The external groups command displays the groups to which you or a user belongs. All users belong to a group. The fourth colon-separated field of the /etc/passwd file defines the primary group to which you belong. You may also belong to other groups by being listed beside a group in the /etc/group file. You have group permissions for files or directories owned by one of the groups to which you are a member.

COMMAND FORMAT

Following is the general format of the groups command.

       groups [ user ... ]

Arguments

The following argument may be passed to the groups command.

user You can specify a list of users whom you want to know to which groups they belong.

RELATED FILES

The groups command reads your user name and group ID from the /etc/passwd file, then searches the /etc/group file for any additional groups to which you belong.

APPLICATIONS

The groups command is used to display all of the groups to which you belong. You may find it helpful to belong to several groups so you have certain access permissions for various directories and files.

TYPICAL OPERATION

In this activity you use the groups command to display your current group membership list. Begin at the shell prompt.

1.  Type groups and press Return to display all of the groups to which you are a member.
2.  Turn to Module 161 to continue the learning sequence.


Previous Table of Contents Next