Ubuntu设置DNS永久生效

Posted minseo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu设置DNS永久生效相关的知识,希望对你有一定的参考价值。

  环境查看

  设置临时生效,修改配置文件/etc/resolv.conf

nameserver 202.96.134.133

   重启失效

  设置永久生效,修改网卡配置文件/etc/network/interfaces

  重启网络

systemctl restart networking

   PS:需要安装resolvconf

apt install resolvconf

 

以上是关于Ubuntu设置DNS永久生效的主要内容,如果未能解决你的问题,请参考以下文章