What is the command to shut down selinux
Close selinux
1. Get the selinux status by using the command "getenforce"
[root@localhost ~] # getenforceEnforcing / / enforceing means to enable, [root@localhost ~] # getenforcePermissive / / permissive means to warn [root@localhost ~] # getenforceDisabled / / disabled means to disable [root@localhost ~] #
2. Enter the command at the terminal to shut down selinux, which is only temporarily closed and has no effect after restart.
[root@localhost ~] # setenforce 0 / / close [root@localhost ~] # getenforcePermissive [root@localhost ~] # setenforce 1 / / enable [root@localhost ~] # getenforceEnforcing
3. Modify the selinux status through the configuration file "/ etc/sysconfig/selinux", which requires restarting the machine.
[root@localhost ~] # gedit / etc/sysconfig/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
4. Close selinux by modifying "/ boot/grub/menu.lst", so that selinux will not be started every time you boot.
[root@localhost ~] # gedit / boot/grub/menu.lst default=0timeout=5splashimage= (hd0,0) / grub/splash.xpm.gzhiddenmenutitle CentOS (2.6.32-431.el6.i686) root (hd0,0) kernel / vmlinuz-2.6.32-431.el6.i686 ro root=/dev/mapper/VolGroup-lv_root nomodeset rd_NO_LUKS rd_NO_MD rd_LVM_LV=VolGroup/lv_swap crashkernel=auto vga=ask.UTF-8 rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_ NO_DM rhgb quiet selinux=0 initrd / initramfs-2.6.32-431.el6.i686.img
The above are the details of how to close selinux, please pay attention to other related articles!