cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

os:linux:user:selinux.html



SELinux - How to Configure SELinux in Linux

Commands

Command Note supplement
getenforce Check SELinux Enforcing ← Enable SELinux
Permissive ← DisableSELinux
setenforce 0 Disable SELinux
setenforce 1 Enable SELinux


Configuration

/etc/selinux/config (RHEL/CentOS7)
/etc/sysconfig/selinux (RHEL/CentOS5,6)

# 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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted



os/linux/user/selinux.html.txt · Last modified: 2021/02/26 by admin

Page Tools