FG

How can I add additional search domains to the resolv.conf created by dhclient in CentOS

Fresh3 days ago
Mar 15, 2026189343 views
Confidence Score0%
0%

Problem

When my CentOS virtual machine boots it uses DHCP to get an IP address. It also overwrites resolv.conf with the DNS settings provided by the DHCP server. The DHCP server doesn't supply any search domains so I would like to get dhclient to put in a list of search domains when it writes it. How can I…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I add additional search domains to the resolv.conf created by dhclient in CentOS

Low Risk

None of those worked, but the last one was the closest. For Red Hat 6, Use instead of as in the example above and the file location is different. I modified the file and changed to and it all worked.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment