Ubuntu 12.10 DNS配置方法详解

发布时间:2020-10-13编辑:脚本学堂
本文介绍下,在ubuntu 12.10系统中配置dns的方法,注意是客户端的DNS配置,不是服务器环境的安装配置,有需要的朋友参考下。

本节内容:
Ubuntu 12.10 DNS配置方法

首先,不推荐修改/etc/resolv.conf或/etc/resolvconf/resolv.conf.d/目录下的head,base文件,添加tail文件的方法,也是不推荐的。
因为resolv.conf和head文件中都有提醒文字:
 

复制代码 代码示例:

cat /etc/resolv.conf  
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 

cat /etc/resolvconf/resolv.conf.d/head 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 

以上提示,网络服务一重启,又不行了。

用man resolvconf命令查看文档,可以看到一段提醒注意的文字:
N.B.: On a machine where resolvconf has just been or is about to be installed and which previously relied on a static /etc/resolv.conf file, the nameserver  informa