quick-docs/modules/ROOT/pages/_partials/proc_disabling-selinux.adoc
2020-11-10 09:46:54 +00:00

51 lines
1.1 KiB
Text

// Module included in the following assemblies:
//
// changing-selinux-states-and-modes.adoc
[#{context}-disabling-selinux]
= Disabling SELinux
When SELinux is disabled, SELinux policy is not loaded at all; it is not enforced and AVC messages are not logged. Therefore, all benefits of running SELinux listed in xref:{context}-benefits-of-selinux[Benefits of SELinux] are lost.
[IMPORTANT]
====
It is recommended to use permissive mode instead of permanently disabling SELinux. See xref:{context}-changing-to-permissive-mode[] for more information about permissive mode.
====
.Prerequisites
* The [package]`grubby` package is installed:
+
[subs="quotes"]
----
$ *rpm -q grubby*
grubby-_version_
----
.Procedure
To permanently disable SELinux:
. Configure your bootloader to add `selinux=0` to the kernel command line:
+
[subs="quotes"]
----
$ *sudo grubby --update-kernel ALL --args selinux=0*
----
. Restart your system:
+
[subs="quotes"]
----
$ *reboot*
----
.Verification step
* After reboot, confirm that the [command]`getenforce` command returns `Disabled`:
+
[subs="quotes"]
----
$ *getenforce*
Disabled
----