How to set a fixed IP in Linux

@[TOC] 1. How to set a fixed IP in Linux
1: Use the ifconfig command to check the current network status;
2: Use the ping command to check whether the network is connected normally;
3: vi /etc/sysconfig/network-scprits/ifcfg-ens33 ( The name of this file may be different)
Insert image description here
4: Restart the network: service network restart
2. Turn off the firewall
1. Start the firewall # systemctl start firewalld
2. Turn off the firewall # systemctl stop firewalld
3. Restart the firewall # systemctl restart firewalld
4. Check the firewall status # systemctl status firewalld
5. Set the firewall to start at startup # systemctl enable firewalld
6. Turn off the firewall at startup # systemctl disable firewalld

Guess you like

Origin blog.csdn.net/asasasasasawqwqwqw/article/details/130937087