What is groups Command in Linux?
In this tutorial we learn how to use groups command in Linux. groups command print the groups a user is in. This command is similar to id command for groups.
groups [OPTION]... [USERNAME]...
Get The Groups of Current User
To get the list of groups where the current user is in we can run groups command without options.
Get The Groups of Specific User
To get the groups of a specific user, we can pass the username to groups command
groups Command Manual / Help
We can use
info command to see the manual page of groups command.
groups command also have
--help option to show list of options.
To open man page for groups command we can use command below. To exit man or info page you can press
To open info page for groups command we can use command below.
To open help page from groups command we can run command below.
Linux groups Command Source Code
You can find groups command source code from the folowing repositories:
- groups source code on GitHub
- groups source code on GNU Savannah cgit
- groups source code on GNU Savannah gitweb
Related Linux Commands
You can read tutorials of related Linux commands below:
In this tutorial we learn how to use groups in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.