{"id":6312,"date":"2014-12-21T14:58:58","date_gmt":"2014-12-21T06:58:58","guid":{"rendered":"http:\/\/www.scriptsmy.com\/?p=209"},"modified":"2023-04-28T09:47:22","modified_gmt":"2023-04-28T09:47:22","slug":"how-to-disabled-selinux-using-command-line-on-centos-6rhel-6","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-disabled-selinux-using-command-line-on-centos-6rhel-6\/","title":{"rendered":"How to Disabled SELinux using Command Line on CentOS 6\/RHEL 6"},"content":{"rendered":"<p>In this short article, I&#8217;ll show you an easy way to disable SELinux in RHEL or CentOS 6 6. You only need to run the following command line. After that, make sure you reboot your CentOS server for changes to take effect.<\/p>\n<p><h7>1. Verify the SELINUX setting before changes :<\/h7><\/p>\n<pre>\n[root@centos66 ~]# sestatus\n<\/pre>\n<pre>\nSELinux status:                 enforcing\n<\/pre>\n<p>Check the config file :<\/p>\n<pre>\n[root@centos66 ~]# cat \/etc\/sysconfig\/selinux\n<\/pre>\n<pre>\n..\n..\nSELINUX=enforcing\n..\n..\n<\/pre>\n<p><h7>2. Issue the following command to changes the config file :<\/h7><\/p>\n<pre>\n[root@centos66 ~]# sed -i 's\/(^SELINUX=).*\/SELINUX=disabled\/' \/etc\/sysconfig\/selinux\n<\/pre>\n<p><h7>3. Verify the SELINUX status again :<\/h7><\/p>\n<pre>\n[root@centos66 ~]# sestatus\n<\/pre>\n<pre>\nSELinux status:                 disabled\n<\/pre>\n<p>Check the config file again :<\/p>\n<pre>\n[root@centos66 ~]# cat \/etc\/sysconfig\/selinux\n<\/pre>\n<p>It will change the following, <strong>SELINUX=disabled<\/strong><\/p>\n<pre>\n# This file controls the state of SELinux on the system.\n# SELINUX= can take one of these three values:\n#     enforcing - SELinux security policy is enforced.\n#     permissive - SELinux prints warnings instead of enforcing.\n#     disabled - No SELinux policy is loaded.\nSELINUX=disabled\n# SELINUXTYPE= can take one of these two values:\n#     targeted - Targeted processes are protected,\n#     mls - Multi Level Security protection.\nSELINUXTYPE=targeted\n<\/pre>\n<p><h7>4. Reboot the CentOS\/RHEL server :<\/h7><\/p>\n<pre>\n[root@centos66 ~]# reboot\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this short article, I&#8217;ll show you an easy way to disable SELinux in RHEL or CentOS 6 6. You only need to run the following command line. After that,&#8230;<\/p>\n","protected":false},"author":6,"featured_media":6321,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1049],"tags":[1256,1536,1748],"class_list":["post-6312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-selinux","tag-centos-6-5","tag-linux","tag-selinux"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=6312"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/6312\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/6321"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=6312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=6312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=6312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}