GSEC Exam QuestionsBrowse all questions from this exam

GSEC Exam - Question 41


Which of the following Linux commands can change both the username and group name a file belongs to?

Show Answer
Correct Answer: A

The correct command that can change both the username and group name a file belongs to is 'chown'. The 'chown' command is used to change file owner and group in Linux. The 'chgrp' command is solely used for changing the group ownership of a file. The 'chmod' command changes the file permissions, and 'newgrp' is used to switch the current user's group. Therefore, 'chown' is the command that meets the requirement stated in the question.

Discussion

1 comment
Sign in to comment
eroms
Aug 25, 2024

A. Chown