## 1、配置ip地址文件 使用vi编辑器编辑以下文件 ``` /etc/sysconfig/network-scripts/ifcfg-eth0 ``` ## 2、修改文件 进入Ins模式对文件进行修改 ``` DNS1=8.8.8.8 #手动添加一个dns地址; ``` ## 3、保存并重启 ``` :wq #保存并退出 ``` DNS配置文件/etc/resolv.conf 的地址会自动匹配手动添加的地址;重启网卡后不会清除; Last modification:September 16, 2018 © Allow specification reprint Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate