Linux groups Command
Posted on February 3, 2021 (Last modified on July 14, 2022) • 2 min read • 269 wordsn 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.
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]...
To get the list of groups where the current user is in we can run groups command without options.
groups
To get the groups of a specific user, we can pass the username to groups command
groups username
We can use man
and 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 q
.
man groups
To open info page for groups command we can use command below.
info groups
To open help page from groups command we can run command below.
groups --help
You can find groups command source code from the folowing repositories:
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.