2

This question already has an answer here:

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?

marked as duplicate by muru, Eric Carvalho, Pilot6, A.B., David Foerster Sep 6 '15 at 7:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • muru: can you please check that question problem and this question – Suresh Sep 4 '15 at 10:43
  • 1
    I did. Can you do that too? – muru Sep 4 '15 at 10:44
  • so you are telling usermod will solve my problem ? is it ? – Suresh Sep 4 '15 at 10:49
  • I prefer adduser (second answer) or gpasswd, but yes. – muru Sep 4 '15 at 10:50
8

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 4 '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 4 '15 at 10:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.