dhclient.conf 取代节被忽略

dhclient.conf 取代节被忽略

我将以下几行放在文件顶部(也尝试了底部)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

相关内容