How do you add group write and execute permissions to myfile.txt in Linux?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Ace your COMPTIA A+ certification with our practice exam. Engage with a variety of questions including multiple choice and performance-based, complete with hints and detailed explanations. Prepare effectively and boost your confidence for the big day!

In Linux, permissions can be assigned to a file for the file owner, groups, and everyone else. The chmod command is used to modify these permissions. Options can be combined to set multiple permissions simultaneously. In this scenario, the correct command to add group write and execute permissions to myfile.txt is "chmod g+wx myfile.txt". Option A, "chmod g-wx myfile.txt", would only remove group write and execute permissions, but not add them. Option B, "chmod g+x myfile.txt", would only add group execute permission, but not group write permission. Option D, "chmod u+wx myfile.txt", would add write and execute permissions for the file owner, not for the group.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy