Group information in Linux is stored in the "/etc/group" file, which has the following notation
From left to right, tama is the group name, X is the password (when it says X, it is written in the /etc/gshadow file). 500 is the GID.
To make a user belong to multiple groups, edit the "/etc/group" file, but it is convenient to use the vigr command to edit the "/etc/group" file. (The operation method is the same as vi)