CompTIA Linux+ (XK0-004) — Question 296

A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands is the BEST option to complete this task?

Answer options

Correct answer: C

Explanation

The correct command is 'touch /.autorelabel && reboot' (C), as it triggers a relabeling of the filesystem upon the next boot, ensuring all SELinux contexts are properly set. The other options either disable SELinux enforcement, set ACLs, or only apply context changes to specific files or directories, which do not restore the entire system's contexts.