Use it to understand why a system has no SELinux protection, or before re-enabling it.
Disabled
Disabled mode turns SELinux off entirely: no policy, no labels maintained. Re-enabling requires a full filesystem relabel.
1. sestatus — disabled?
2. Plan: set permissive, touch /.autorelabel, reboot.
3. After relabel: check ausearch -m AVC.
4. Fix denials, then set enforcing.
5. Reboot and confirm.
disabled → permissive with relabel → denials fixed → enforcing
For SELinux → Disabled, continue with the first unproven Topic check: Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Disabled. If that boundary is healthy, advance to the adjacent check: Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
boot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validation
Healthy evidence: disabled state is intentional/documented when required, transition prerequisites are understood and re-enable testing includes labeling plus workload verification
Step 2 Verification and output interpretation Verify boundary
Verification chain. boot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validation
Step 3 Commands Verify boundary
sestatus
grubby --update-kernel=ALL --args=selinux=0 # not recommended
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: SELinux is unexpectedly disabled, teams infer safety from missing AVCs, labels are stale before re-enable, or configuration changes require reboot but are assumed effective immediately
Step 5 Common mistakes Narrow the fault
- Disabling SELinux instead of fixing policy; re-enabling later needs a full relabel.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Disabling is not recommended. To re-enable, set SELINUX=permissive first, touch /.autorelabel, reboot (relabel), check denials, then enforcing. On RHEL 9 disable is done with the kernel parameter selinux=0.
getenforce / sestatus— mode and policyls -Z <path>— file contextps -eZ | grep <proc>— process contextausearch -m AVC -ts recent— recent denialssemanage fcontext -l | grep <path>— context rules for a path
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Disabled state shows the SELinux layer is absent from the access decision for that boot, but it does not show the system is secure or ready to re-enable without labeling/policy verification.
In depth
Disabled: why not to, and how to come back
Disabling SELinux removes its protection entirely, and also stops the system from keeping file labels up to date. The selinux(8) manual page notes that setting SELINUX=disabled in /etc/selinux/config is deprecated, and may not fully disable SELinux. If it really must be turned off, it recommends the selinux=0 kernel boot option instead. Red Hat's guide strongly discourages disabling it, and recommends permissive mode for troubleshooting instead.
Disabled and permissive compared
| Disabled | Permissive | |
|---|---|---|
| Policy loaded | No | Yes |
| Denials logged | No | Yes |
| New files labelled | No | Yes |
| Return to enforcing | Needs a full relabel and a reboot | setenforce 1 |
| Per-domain choice | No | Yes |
Coming back from disabled
Files created while SELinux was disabled have no labels. Switching straight to enforcing can then make services, or even logins, fail.
| Step | Command |
|---|---|
1. Remove selinux=0 from the kernel command line, if set | grubby --update-kernel=ALL --remove-args="selinux" |
| 2. Set permissive in the config | SELINUX=permissive |
| 3. Request a full relabel | touch /.autorelabel |
| 4. Reboot (the relabel can take a long time) | reboot |
| 5. Check the denials, fix them | ausearch -m AVC -ts boot |
| 6. Switch to enforcing | setenforce 1; SELINUX=enforcing |
Why people disable it, and better answers
| Reason given | Better answer |
|---|---|
| "The application doesn't work with SELinux" | Find the denials; usually file contexts, ports or a boolean |
| "The vendor says to disable it" | Ask the vendor for a policy, or confine the app in a permissive domain |
| "It slows the system down" | The overhead is normally small; measure it |
host$ sestatus | head -1
SELinux status: disabled
host$ cat /proc/cmdline | grep -o "selinux=[01]"
selinux=0
host$ sudo grubby --update-kernel=ALL --remove-args="selinux"
host$ sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
host$ sudo touch /.autorelabel && sudo reboot
host$ sestatus | grep -E "SELinux status|Current mode"
SELinux status: enabled
Current mode: permissive
host$ sudo ausearch -m AVC -ts boot | grep -c denied
Relabelling time
The relabel at boot walks the whole file system. On systems with many millions of files it can take a long time, and the console shows progress. Plan it like a maintenance window.
Documented example, not captured output.
How it works at runtime
Disabled is part of SELinux → Disabled. SELinux Disabled mode means SELinux policy enforcement is not active for the running system and may require boot-time configuration/reboot to change, so absence of AVCs cannot be used as evidence of correct policy.
Topic-specific state model. SELinux Disabled mode means SELinux policy enforcement is not active for the running system and may require boot-time configuration/reboot to change, so absence of AVCs cannot be used as evidence of correct policy.
Interpretation rule. - Disabled SELinux ≠ permissive SELinux.
- No AVCs while disabled ≠ the workload would succeed under enforcing policy.
Quick reference
Disabled mode turns SELinux off completely; files created meanwhile get no labels. Re-enabling requires a full relabel at boot:
touch /.autorelabel; reboot
# or: fixfiles -F onboot
On RHEL 9+, setting SELINUX=disabled in /etc/selinux/config no longer fully disables SELinux at runtime; use the kernel parameter selinux=0 if truly required. Disabling is rarely justified — permissive or per-domain permissive keeps labelling intact.
Limits and how it fails
Primary failure point. Disabled state shows the SELinux layer is absent from the access decision for that boot, but it does not show the system is secure or ready to re-enable without labeling/policy verification.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Disabled owns the no-enforcement state and safe transition planning.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in SELinux → Disabled. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://selinuxproject.org/page/Main_Page · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Disabled operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Disabled.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | SELinux Disabled mode means SELinux policy enforcement is not active for the running system and may require boot-time configuration/reboot to change, so absence of AVCs cannot be used as evidence of correct policy. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + boot/time + real identity/workload → identify authoritative policy/key/trust source → read back loaded/effective runtime state → reproduce one safe allow/deny/handshake test → correlate audit/service/kernel evidence → locate first failed boundary → make the smallest persistent change → repeat original workload + regression/recovery check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | boot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validation | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Disabled state proves the SELinux layer is absent from the access decision for that boot; it does not prove the system is secure or ready to re-enable without labeling/policy verification. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux security/trust evidence can establish this proof path: boot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved identities, objects, policies, namespaces, endpoints or time periods. Disabled state proves the SELinux layer is absent from the access decision for that boot; it does not prove the system is secure or ready to re-enable without labeling/policy verification. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven security/trust boundary, capture the adjacent effective state and audit/handshake evidence, make only the demonstrated persistent change, then repeat the original workload plus recovery/regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Disabled · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Disabled |
|---|---|
| Topic path | SELinux → Disabled |
| Runtime state | SELinux Disabled mode means SELinux policy enforcement is not active for the running system and may require boot-time configuration/reboot to change, so absence of AVCs cannot be used as evidence of correct policy. |
| Fast checks | - Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Disabled. - Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. - Reproduce one safe allowed/denied or handshake/access test and correlate kernel/service/audit evidence at the first relevant boundary. - Apply the smallest persistent cause-specific change, then repeat the original test plus an adjacent regression/recovery check. |
| Verification chain | boot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Disabled state proves the SELinux layer is absent from the access decision for that boot; it does not prove the system is secure or ready to re-enable without labeling/policy verification. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |