Share with your friends
Call

Using the chgrp Command.

The chgrp command can be used to change the group associated with a specified file or directory. This command is especially useful when managing multiple files and directories, as it allows you to quickly assign or reassign groups to multiple files and directories at once.

Steps to Use chgrp Command

  1. Open a terminal window.
  2. Type the following command: chgrp <group_name> [file_name]
  3. Replace group_name with the name of the group you wish to assign to the file.
  4. Replace file_name with the name of the file you wish to change the group for.
  5. Press Enter to execute the command.

Once the command has been executed, the group associated with the specified file should be changed to the group you have specified. This should be reflected in the file or directory listing command (e.g. ls): the group associated with the file should now be the group specified.