Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a standard Linux distribution (e.g. Ubuntu) there is usually /etc/group and /etc/group-, where the second one is only readable by root.

man group only describes /etc/group.

Thus my question: What is the purpose of /etc/group-?

share|improve this question
up vote 10 down vote accepted

It is a backup of the previous copy of the file that is version of the file before the last change. It is kept because it is very important file. You can delete it, but backups are a "good thing".

You can easily verify it. Try

# groupadd test
# diff /etc/group /etc/group-

There are other files also that are backed up the same way viz. /etc/passwd- /etc/shadow-.

All the user and group management utilities like useradd, usermod, userdel, groupmod, groupdel etc. create/update these backup files after successful execution of the command.

share|improve this answer
Ok, I guess this would be another reason to modify /etc/group via group-commands and not directly editing it. – maxschlepzig Nov 29 '11 at 8:38
@maxschlepzig, smart. I have updated my answer to mention the user and group management utilities. – Sachin Divekar Nov 29 '11 at 8:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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