title: What's the difference between commands cat /etc/group & groups & getent group
body: <p>I am a novice Unix user and was wondering where all the groups are stored in Unix. I thought that they would be updated in <code>/etc/group</code> file but when I read that file it does not have everything. Whereas, <code>getent group</code> command displays all the groups and associated users in each group.</p>
  <p>I am aware that each user has a primary group, which will be stored in <code>/etc/passwd</code> (usually in field 4), and may have one or more supplementary groups. Only the supplementary group associations are in <code>/etc/group</code></p>
  <p>So, here are my questions.</p>
  <ol>
  <li><p>Am I under the wrong impression that all groups are stored in <code>/etc/group</code> ?</p>
  </li>
  <li><p>If so, what is the difference between these three commands <br/><br/>
  a. <code>cat /etc/group</code><br/>
  b. <code>groups</code><br/>
  c. <code>getent group</code><br/><br/></p>
  </li>
  <li><p>Why am I able to see more groups when I use the command <code>getent groups</code> than <code>cat /etc/group</code> ?</p>
  </li>
  </ol>
  <p>Please let me know.</p>