groupadd: group 'xxxx' already exist [duplicate]

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?

4

1 Answer

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.

2

You Might Also Like