0
0
Linux CLIscripting~15 mins

chgrp (change group) in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Change Group Ownership of Files Using chgrp
📖 Scenario: You are managing files on a Linux system for a small team. Some files need to be assigned to a specific group so that team members can access them properly.
🎯 Goal: Learn how to use the chgrp command to change the group ownership of files.
📋 What You'll Learn
Create three empty files named report.txt, summary.txt, and data.csv
Create a group named teamgroup
Use chgrp to change the group ownership of the three files to teamgroup
Verify the group ownership of the files using ls -l
💡 Why This Matters
🌍 Real World
System administrators often need to assign files to specific groups so that team members can share access easily.
💼 Career
Knowing how to manage file permissions and group ownership is essential for Linux system administration and security management.
Progress0 / 4 steps
1
Create the files
Create three empty files named report.txt, summary.txt, and data.csv using the touch command.
Linux CLI
Need a hint?

Use touch followed by the file names separated by spaces.

2
Create the group
Create a new group named teamgroup using the groupadd command.
Linux CLI
Need a hint?

Use groupadd followed by the group name.

3
Change group ownership of files
Use the chgrp command to change the group ownership of report.txt, summary.txt, and data.csv to the group teamgroup.
Linux CLI
Need a hint?

Use chgrp followed by the group name and then the file names.

4
Verify the group ownership
Use the ls -l command to display the details of report.txt, summary.txt, and data.csv and verify that their group ownership is teamgroup.
Linux CLI
Need a hint?

Use ls -l followed by the file names to see detailed info including group ownership.