更换国内DNS

echo -e "options timeout:1 attempts:1 rotate\nnameserver 119.29.29.29\nnameserver 114.114.114.114">/etc/resolv.conf;

更换国外DNS

echo -e "options timeout:1 attempts:1 rotate\nnameserver 1.1.1.1\nnameserver 1.0.0.1" >/etc/resolv.conf;

推荐国内外并行的DNS配置

echo -e "options timeout:1 attempts:1 rotate\nnameserver 119.29.29.29\nnameserver 8.8.8.8" >/etc/resolv.conf;
echo -e "options timeout:1 attempts:1 rotate\nnameserver 114.114.114.114\nnameserver 8.8.8.8" >/etc/resolv.conf;

查看修改后的DNS配置

cat /etc/resolv.conf