thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Intermediate

SELinux Modes

The three SELinux operating states: enforcing (blocks and logs), permissive (logs only) and disabled.

Definition

getenforce shows the current mode and setenforce 0 or 1 switches between permissive and enforcing at runtime. The persistent mode is set in /etc/selinux/config. Moving from disabled to enabled requires a reboot and a full relabel.

Example

setenforce 0 temporarily switches to permissive to confirm SELinux is causing a failure.

Exam tip

setenforce cannot disable SELinux; disabling requires a config change and reboot, and is rarely the right exam answer.

Related terms