How to add a user to a group on RHEL 8 -

In the context of a discretionary access control (DAC) mechanism, the access to system resources, files and directories, is based on the identity of the users and on the groups they are member of. This type of access control is called "discretionary" because a user can perform its own policy decisions (limited by its own permissions, of course). In this tutorial we will see how to add a user to a group and what is the difference between a primary and a secondary group on a Red Hat Enterprise Linux 8 system.
This is a companion discussion topic for the original entry at