- 在网卡文件中修改
echo 'DNS1="114.114.114.114" ' >> /etc/sysconfig/network-scripts/ifcfg-eth0
- 在主机表文件host文件中修改
echo "223.231.234.33 www.baidu.com" >> /etc/hosts
- 在域名服务器中修改
echo 'nameserver 114.114.114.114' >> /etc/resolv.conf
echo 'DNS1="114.114.114.114" ' >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo "223.231.234.33 www.baidu.com" >> /etc/hosts
echo 'nameserver 114.114.114.114' >> /etc/resolv.conf
本文标题:linux配置dns三种方式
本文链接:https://www.haomeiwen.com/subject/ywzcvftx.html
网友评论