Exam GSEC All QuestionsBrowse all questions from this exam
Question 40

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

    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
eromsOption: A

A. Chown