1

简单粗暴的Ubuntu添加DNS方法,永久有效的那种

 2 years ago
source link: https://vps.la/2021/10/03/%e7%ae%80%e5%8d%95%e7%b2%97%e6%9a%b4%e7%9a%84ubuntu%e6%b7%bb%e5%8a%a0dns%e6%96%b9%e6%b3%95%ef%bc%8c%e6%b0%b8%e4%b9%85%e6%9c%89%e6%95%88%e7%9a%84%e9%82%a3%e7%a7%8d/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
简单粗暴的Ubuntu添加DNS方法,永久有效的那种 - VPS啦-VPS啦

简单粗暴上代码,直接复制粘贴运行即可:

apt-get install -y resolvconf
echo “TRUNCATE_NAMESERVER_LIST_AFTER_127=no”>>/etc/default/resolvconf
cat /etc/default/resolvconf
echo “nameserver 8.8.8.8”>>/etc/resolvconf/resolv.conf.d/base
echo “nameserver 8.8.4.4”>>/etc/resolvconf/resolv.conf.d/base
cat /etc/resolvconf/resolv.conf.d/base
resolvconf -u

本文的添加的DNS是谷歌的8.8.8.8,8.8.4.4

未经允许不得转载:VPS啦 » 简单粗暴的Ubuntu添加DNS方法,永久有效的那种


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK