I'm trying to modify the domain search order that is obtained via DHCP a la dhclient.conf:

append domain-search "example.com";

I'm using Fedora 17 (beta) and it uses NetworkManager. It builds a file /var/run/nm-dhclient-INTERFACE.conf which it then calls as the config file for dhclient. My question is, how do I get NetworkManager to insert my line into that file?


Edit (or create) /etc/dhcp/dhclient-<device>.conf and add the line

append domain-search "example.com";
  • This works in the narrow case of the OP's specific dhclient declaration. It should be noted that this will not generally work. NetworkManager uses the values in dhclient*.conf as defaults and will override them in some cases (eg. send host-name) and will ignore some declarations and blocks (eg.script).
    – crass
    Nov 18 '20 at 22:57
  • Doesn’t work any more in the year 2021. Sep 22 '21 at 13:52

In fedora 19 I was able to do this by editing /etc/sysconfig/network-scripts/ifcfg-[network name here] and adding a line at the end that said:


It automatically restarted the connection when I saved and everything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.