Firewall and SELinux can be turned off in Linux via the command line or GUI. How to turn off the firewall: Execute sudo systemctl stop firewalld and sudo systemctl disable firewalld in the command line, or turn its switch to "off" in the GUI. To turn off SELinux: execute sudo setenforce 0 from the command line or select it as "disabled" in the GUI. Turning off the firewall or SELinux will reduce system security and should only be done when clearly necessary.
How to turn off the firewall and SELinux in Linux
Firewall
Use the command line to turn off the firewall:
<code class="bash">sudo systemctl stop firewalld sudo systemctl disable firewalld</code>
Use the GUI (Graphical User Interface):
SELinux
Turn off SELinux using the command line:
<code class="bash">sudo setenforce 0 # 或者,将 /etc/selinux/config 中的 SELINUX=enforcing 更改为 SELINUX=disabled</code>
Using GUI:
Note:
The above is the detailed content of How to turn off the firewall and selinux in linux. For more information, please follow other related articles on the PHP Chinese website!