SELinux
General commands
semanage login -l= view the mappings of SELinux users to Linux userssemanage $user -l= view a specific SELinux user detailssestatus= show current status of SELinuxgetenforce= get the current mode of SELinuxsetenforce 'enforcing'= set the mode of SELinux as “enforcing”getsebool -a= show all the boolean settings that can be modified. A longer visualization can be had withsemanage boolean -lsetsebool -P httpd_enable_homedirs=1= enable thehttpd_enable_homedirsboolean. 1 is “on”, whereas 0 would be “off”ps axZ= get all running processes with added showing the SELinux contexts they’re running underchcon $context $file= change the context of a file to$contextrestorecon $file= restore the SELinux context for$fileaccording to default policies