5

I have created a group in Ubuntu terminal called terminal using groupadd terminal command and when I list out the groups using groups command it will not show the newly created group name in the output but if I add the same group again it gives me

groupadd: group 'terminal' already exists

error message but the group name exists in /etc/group file. Why I am not able to see the newly added group while running group command?

Suresh
  • 329

1 Answers1

14

groups shows you your groups and not all. You could list all groups for example like that:

getent group

If you added yourself to the group, you'll need to logout and login for the change to take effect.

  • Jakob: if groups shows my groups then the added group generally goes under whom ? If I wanted to added group under me then how do I do that ? – Suresh Sep 04 '15 at 10:45
  • 2
    @Suresh it doesn't go "under" anybody, it just is. A group without any members. If you want to add your user to a group, see the question I linked to. – muru Sep 04 '15 at 10:49