How can I add a user to a group under Linux operating system?
You can use useradd or usermod commands to add a user to a group. useradd command creates a new user or update default new user information. usermod command modifies a user account i.e. it is useful to add user to existing group. There are two types of group. First is primary user group and other is secondary group. All user account related information is stored in /etc/passwd, /etc/shadow and/etc/group files to store user information.
useradd example
useradd -G {group-name} username
# grep developers /etc/group