1 打开该文件
vi /etc/sysconfig/network-scripts/ifcfg-ethXX
2 修改
BOOTPROTO=static
3 添加
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
4 生效
sudo systemctl restart network
标签:network,centos,ip,192.168,8.8,chatgpt From: https://www.cnblogs.com/kaka-qiqi/p/17284803.html