ip addr 檢視網路卡名稱 enp7s0
cd /etc/sysconfig/network-script/
vi ifcfg-enp7s0
修改
BOOTPROTO=static
ONBOOT=yes
IPV6INIT=no
IPADDR=192.168.1.252
NETMASK=255.255.255.0
GATEWAY=192.168.1.2
DNS1=114.114.114.114
:!wq
systemctl restart network
ip addr