Disabling SELinux

You can fully disable SELinux by setting the selinux kernel parameter to zero.

Important:

Oracle doesn't recommend disabling SELinux in production systems. Use permissive mode instead.

  1. Set the required kernel parameter.

    Use the grubby utility to set the selinux parameter to zero:

    sudo grubby --update-kernel ALL --args selinux=0
  2. Restart the system.
  3. Check that SELinux is disabled.

    Run the getenforcing command and verify that the output is Disabled:

    getenforcing
    Disabled
  4. (Optional) Reenable SELinux

    To reenable SELinux, enter the following command and restart the system:

    sudo grubby --update-kernel ALL --remove-args selinux