如何在Ubuntu 12.04中设置DNS搜索域?

前端之家收集整理的这篇文章主要介绍了如何在Ubuntu 12.04中设置DNS搜索域?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
/etc/resolv.conf是从/ etc / network / interfaces的内容动态生成的,在我的系统中包含如下所示的行:
  1. dns-servers 8.8.8.8

如何使用此配置包含默认搜索域?如果重要,我正在运行纯ubuntu服务器配置,没有安装X服务器.

由于您似乎使用resolvconf,因此您需要在网络接口文件中使用dns-search选项
  1. #/etc/network/interfaces
  2. # The primary network interface
  3. auto eth0
  4. iface eth0 inet static
  5. address 10.2.37.4
  6. netmask 255.255.254.0
  7. gateway 10.2.37.1
  8. dns-nameservers 10.2.51.4 10.2.52.4
  9. dns-search example.org

猜你在找的Ubuntu相关文章