0
0
Linux CLIscripting~20 mins

groups and group management in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Groups and Group Management in Linux CLI
📖 Scenario: You are a system administrator managing user groups on a Linux server. You need to create groups, add users to groups, and check group memberships to organize permissions properly.
🎯 Goal: Learn how to create a group, add a user to that group, and verify the group membership using Linux command line tools.
📋 What You'll Learn
Create a new group named exactly developers
Add an existing user named exactly alice to the developers group
Check and display the groups that alice belongs to
💡 Why This Matters
🌍 Real World
Managing user groups is essential for controlling access to files and services on Linux servers in real workplaces.
💼 Career
System administrators and DevOps engineers regularly manage groups to set permissions and organize users efficiently.
Progress0 / 4 steps
1
Create the group developers
Use the groupadd command to create a new group called developers.
Linux CLI
Need a hint?

Type sudo groupadd developers to create the group.

2
Add user alice to the developers group
Use the usermod command with the -aG option to add the user alice to the group developers.
Linux CLI
Need a hint?

Use sudo usermod -aG developers alice to add alice to the group.

3
Check groups for user alice
Use the groups command followed by alice to display all groups that the user alice belongs to.
Linux CLI
Need a hint?

Type groups alice to see alice's group memberships.

4
Display the groups of alice
Print the output of the groups alice command to show the groups that alice belongs to.
Linux CLI
Need a hint?

The output should list alice and developers among the groups.