Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

selinux

//This disables selinux this boot
$ setenforce 0

//To entirely disable selinux
$ sudo vi /etc/sysconfig/selinux

//Change the SELINUX=enforcing directive to SELINUX=disabled.

//Then reboot
Comment

selinux

$ /usr/sbin/sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 23
Policy from config file:        targeted

Comment

selinux

# 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=permissive
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted

Comment

selinux

# 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=enforcing
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted

Comment

selinux

$ /usr/sbin/getenforce
Disabled

Comment

selinux

*** Warning -- SELinux targeted policy relabel is required.
*** Relabeling could take a very long time, depending on file
*** system size and speed of hard drives.
****

Comment

selinux

# 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 two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted

Comment

selinux

$ /usr/sbin/getenforce
Enforcing

Comment

PREVIOUS NEXT
Code Example
Shell :: linux change password chpasswd 
Shell :: openldap install centos 8 
Shell :: install bottom navigation in react native 
Shell :: bash multiline string variable 
Shell :: mv linux command 
Shell :: windows 10 open git bash here 
Shell :: mac shell echo command 
Shell :: npm install, npm install for web developer 
Shell :: how to scroll up in linux terminal 
Shell :: statsmodels logit function 
Shell :: Move or change directory to specific location in Terminal 
Shell :: dos dir to text file 
Shell :: cat example 
Shell :: get total github lines 
Shell :: linux find and rename files with text 
Shell :: mv command in linux 
Shell :: git basics 
Shell :: shell search history 
Shell :: blue ocean jenkins 
Shell :: install babel language 
Shell :: flutter doctor --android-licenses error 
Shell :: public access denied assmebla 
Shell :: repo tool depth 
Shell :: Install Deno - Shell (Mac, Linux) 
Shell :: copy content from one files to another in linux shell script 
Shell :: Install Chef Habitat from the Command Line 
Shell :: install goaccess 
Shell :: get last line from string powershell 
Shell :: no vnc download 
Shell :: coder.com docker install 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =