如何在Ubuntu 12.04中设置DNSsearch域?

/etc/resolv.conf是从/etc/network/interfaces的内容中dynamic生成的,在我的系统上包含这样的一行:

 dns-servers 8.8.8.8 

如何在此configuration中包含默认search域? 如果重要的话,我正在运行一个纯粹的Ubuntu服务器configuration,没有安装X服务器。

由于您似乎正在使用resolvconf,因此您需要在networking接口文件中使用dns-search选项

 #/etc/network/interfaces # The primary network interface auto eth0 iface eth0 inet static address 10.2.37.4 netmask 255.255.254.0 gateway 10.2.37.1 dns-nameservers 10.2.51.4 10.2.52.4 dns-search example.org