Back to DevOps Series
Linux Users & Groups :

Linux Users & Groups :

1. Create a New User

Loading...
  • m → Creates the user's home directory.
  • Example:
Loading...
Creates:
Loading...

2. Set Password for User

Loading...
Example:
Loading...

3. Create a New Group

Loading...
Example:
Loading...

4. Add User to a Group

Loading...
Example:
Loading...
  • a → Append; keeps the user's existing groups.
  • G → Specifies the supplementary group.

5. Show All Users

Loading...
Shows all user accounts on the system.
To see only usernames:
Loading...

6. Show All Groups

Loading...
Shows all groups on the system.
To see only group names:
Loading...

7. Check a User's Groups

Loading...
Example:
Loading...
Shows which groups the user belongs to.

8. Complete Example

Loading...
Result:
Loading...