Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Disabled

Direct answer

Disabled mode turns SELinux off entirely: no policy, no labels maintained. Re-enabling requires a full filesystem relabel.

When to use this

Use it to understand why a system has no SELinux protection, or before re-enabling it.

First 30 seconds

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.

Operational verification

disabled → permissive with relabel → denials fixed → enforcing

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to understand why a system has no SELinux protection, or before re-enabling it.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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.

Key checks
  • getenforce / sestatus — mode and policy
  • ls -Z <path> — file context
  • ps -eZ | grep <proc> — process context
  • ausearch -m AVC -ts recent — recent denials
  • semanage 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

DisabledPermissive
Policy loadedNoYes
Denials loggedNoYes
New files labelledNoYes
Return to enforcingNeeds a full relabel and a rebootsetenforce 1
Per-domain choiceNoYes

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.

StepCommand
1. Remove selinux=0 from the kernel command line, if setgrubby --update-kernel=ALL --remove-args="selinux"
2. Set permissive in the configSELINUX=permissive
3. Request a full relabeltouch /.autorelabel
4. Reboot (the relabel can take a long time)reboot
5. Check the denials, fix themausearch -m AVC -ts boot
6. Switch to enforcingsetenforce 1; SELINUX=enforcing

Why people disable it, and better answers

Reason givenBetter 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
selinux disableddisable selinuxselinux off
Embedded reference data

Quick lookup tables

Disabled operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Disabled.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateSELinux 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 verificationPin 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 chainboot configuration → kernel/LSM initialization → SELinux disabled state → no SELinux policy enforcement → workload → planned re-enable/relabel validationTrace requested/configured state through effective state to the observed workload result.
Failure boundaryDisabled 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 evidenceCorrelated 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 validationUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryDisabled
Topic pathSELinux → Disabled
Runtime stateSELinux 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 chainboot 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 boundaryDisabled 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?