List all group on Linux

 

List all group on Linux Fedora.

 

   How to list all group on Linux system?  The command example below show how to list all group on Linux Fedora system.  The list of group name came from the group configuration file is store in /etc/group and you can also use cat command to display the contents of group file. Please note that you may need root user privilege to view the contents of group file.

 

List all group in Linux example:

 

1.  Open the shell terminal, type in su - command to become root user.

[linux@fedora11 ~]$ su -

Password:

[root@fedora11 ~]#

 

2.  Execute command XX as show on example below to list all group in your Linux system.  This list of group is taken from /etc/group configuration file, you may customize command below to meet your need.

Linux list all group on Linux Fedora

[root@fedora11 ~]# awk -F":" '{ print "groupname: " $1 "\tgroupid: " $3 "\tsupplementarygroup: " $4 }' /etc/group

groupname: root groupid: 0      supplementarygroup: root

groupname: bin  groupid: 1      supplementarygroup: root,bin,daemon

groupname: daemon       groupid: 2      supplementarygroup: root,bin,daemon

groupname: sys  groupid: 3      supplementarygroup: root,bin,adm

groupname: adm  groupid: 4      supplementarygroup: root,adm,daemon

groupname: tty  groupid: 5      supplementarygroup:

groupname: disk groupid: 6      supplementarygroup: root

groupname: lp   groupid: 7      supplementarygroup: daemon,lp

groupname: mem  groupid: 8      supplementarygroup:

groupname: kmem groupid: 9      supplementarygroup:

groupname: wheel        groupid: 10     supplementarygroup: root

groupname: mail groupid: 12     supplementarygroup: mail

groupname: uucp groupid: 14     supplementarygroup: uucp

groupname: man  groupid: 15     supplementarygroup:

groupname: games        groupid: 20     supplementarygroup:

groupname: gopher       groupid: 30     supplementarygroup:

groupname: video        groupid: 39     supplementarygroup:

groupname: dip  groupid: 40     supplementarygroup:

groupname: ftp  groupid: 50     supplementarygroup:

groupname: lock groupid: 54     supplementarygroup:

groupname: audio        groupid: 63     supplementarygroup:

groupname: nobody       groupid: 99     supplementarygroup:

groupname: users        groupid: 100    supplementarygroup:

groupname: utmp groupid: 22     supplementarygroup:

groupname: utempter     groupid: 35     supplementarygroup:

groupname: floppy       groupid: 19     supplementarygroup:

groupname: vcsa groupid: 69     supplementarygroup:

groupname: avahi-autoipd        groupid: 499    supplementarygroup:

groupname: ntp  groupid: 38     supplementarygroup:

groupname: slocate      groupid: 21     supplementarygroup:

groupname: gnokii       groupid: 498    supplementarygroup:

groupname: dbus groupid: 81     supplementarygroup:

groupname: polkituser   groupid: 87     supplementarygroup:

groupname: cdrom        groupid: 11     supplementarygroup:

groupname: tape groupid: 33     supplementarygroup:

groupname: dialout      groupid: 18     supplementarygroup:

groupname: avahi        groupid: 497    supplementarygroup:

groupname: mailnull     groupid: 47     supplementarygroup:

groupname: smmsp        groupid: 51     supplementarygroup:

groupname: rpc  groupid: 32     supplementarygroup:

groupname: apache       groupid: 48     supplementarygroup:

groupname: nscd groupid: 28     supplementarygroup:

groupname: rpcuser      groupid: 29     supplementarygroup:

groupname: nfsnobody    groupid: 496    supplementarygroup:

groupname: sshd groupid: 74     supplementarygroup:

groupname: tcpdump      groupid: 72     supplementarygroup:

groupname: pulse        groupid: 495    supplementarygroup:

groupname: pulse-rt     groupid: 494    supplementarygroup:

groupname: pulse-access groupid: 493    supplementarygroup:

groupname: wbpriv       groupid: 88     supplementarygroup:

groupname: smolt        groupid: 492    supplementarygroup:

groupname: torrent      groupid: 491    supplementarygroup:

groupname: haldaemon    groupid: 68     supplementarygroup:

groupname: mysql        groupid: 27     supplementarygroup:

groupname: gdm  groupid: 42     supplementarygroup:

groupname: fedora11     groupid: 500    supplementarygroup:

groupname: fedora       groupid: 501    supplementarygroup:

groupname: linux        groupid: 502    supplementarygroup:

groupname: james        groupid: 503    supplementarygroup:

groupname: jason        groupid: 504    supplementarygroup:

[root@fedora11 ~]#

 

Keywords: linux list all group, linux list group, linux display group, list group, list linux group, list all group, list all group on linux