selinux

Configuration

Config files located @ /etc/sysconfig/selinux

Operation

  • Check the status of selinux: /usr/bin/sestatus
  • Get the current state of selinux: getenforcing
  • Listing the context of files: ls -lZ
  • Listing the context of directory: ls -dZ <path>
  • Get the contexts running in memory: ps -axZ
  • Get the contexts of connections: netstat -tnlpZ
  • Get managed ports context: semanage port -l
  • Get all of the booleans: getsebool -a
  • Set a boolean and make it permanent: setsebool <bool> <value> -P