Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Linux Commands
  1. Home
  2. Guides
  3. Linux Commands
  4. Linux groups Command

Linux groups Command

Share via
Howtodojo
Link copied to clipboard

n 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.

On this page
What is groups Command in Linux?   groups Syntax   Get The Groups of Current User   Get The Groups of Specific User   groups Command Manual / Help   Linux groups Command Source Code   Related Linux Commands   Summary  

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 Syntax  

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.

groups

Get The Groups of Specific User  

To get the groups of a specific user, we can pass the username to groups command

groups username

groups Command Manual / Help  

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

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:

  • w command in Linux
  • id command in Linux
  • who command in Linux

Summary  

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.

 Linux cksum Command
Linux false Command 
On this page:
What is groups Command in Linux?   groups Syntax   Get The Groups of Current User   Get The Groups of Specific User   groups Command Manual / Help   Linux groups Command Source Code   Related Linux Commands   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard