![dhclient.conf 取代节被忽略](https://linux22.com/image/1044618/dhclient.conf%20%E5%8F%96%E4%BB%A3%E8%8A%82%E8%A2%AB%E5%BF%BD%E7%95%A5.png)
我将以下几行放在文件顶部(也尝试了底部)dhclient.conf
:
send host-name "hostname";
supersede domain-name "my-domain-name"
supersede domain-search "my-domain-name"
supersede search "my-domain-name"
尽管如此,我的/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
nameserver 123.123.123.123
nameserver 123.123.123.123
search dhcp-supplied-domain-name
我已经更改了域名和 IP 地址来保护我的系统。
我怎样才能让这个变化反映在我的resolv.conf
?
答案1
正如您引用它一样,dhclient.conf
每个语句后都缺少一个终止分号supersede
。