How to disable on CentOS 8 SELinux

Security-Enhanced Linux, or SELinux is to provide access control security policy mechanism or security module. In short, it is a feature or service for users to restrict certain policies and rules set by the system administrator.

How to temporarily disable on CentOS 8 SELinux

Before you begin disabling SELinux on CentOS 8, be sure to check the status of SELinux.

To do this, run the following command:

How to disable on CentOS 8 SELinux

This indicates that SELinux is up and running.

To temporarily disable SELinux, run the command.

# setenforce 0

Alternatively, you can run the command.

# setenforce Permissive

Any one of these commands will temporarily disable SELinux, up until the next reboot.

How do you permanently disabled on CentOS 8 SELinux

Now, let's see how to permanently disable SELinux. SElinux configuration file located in / etc / selinux / config. Therefore, we need to make some changes to the file.

# vi /etc/selinux/config

The SELinux property to Disabled, as follows:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#    enforcing - SELinux security policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
#    disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
#    targeted - Targeted processes are protected,
#    minimum - Modification of targeted policy. Only selected processes are protected.
#    mls - Multi Level Security protection.
SELINUXTYPE=targeted

How to disable on CentOS 8 SELinux

Save and exit the configuration file, and then use any of the following command to restart CentOS 8 Linux systems.

# reboot
# init 0
# telinit 0

Now, use the command to check the status of SELinux.

How to disable on CentOS 8 SELinux

SELinux is critical features on CentOS 8, it helps to limit access to certain services on the user's system without authorization.

In this guide, we demonstrate how to disable SELinux on CentOS 8. Ideally, in addition to the configuration of services need to disable SELinux instance, it is always recommended to keep SELinux is enabled.

I hope you understand this guide. Today these. We welcome your feedback.

Guess you like

Origin www.linuxidc.com/Linux/2019-11/161565.htm