What is the syntax for changing the group ownership of a file?

Prepare for the LPI Linux Essentials Exam. Study with flashcards and multiple choice questions, each with hints and explanations. Get exam-ready!

To change the group ownership of a file, the correct command to use is 'chgrp'. The syntax 'chgrp group file.txt' correctly specifies the name of the group followed by the filename, allowing you to assign the specified group to the file.

The 'chown' command is primarily used for changing both the user and group ownership of a file, but it requires a specific syntax to change only the group, which the provided option does not reflect accurately. The 'chmod' command is meant for changing file permissions, not ownership, which makes those choices incorrect for the task at hand. Thus, 'chgrp' is the purpose-built command for adjusting the group associated with a file.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy