Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 15628  / 1 Year ago, sat, april 15, 2023, 6:25:07

Please provide:




  • correct location to add my custom domain search option (preferably appending it to the DHCP list, instead of prepending)

  • command to run to make the settings effective



Note: do not ask me to modify files that are auto-regenerated and overridden, like /etc/resolv.conf


More From » dns

 Answers
4

You will need to edit this file with your favorite editor:



sudo vim /etc/dhcp/dhclient.conf


Once in file, you should see a commented line with the word supersede next to it:



#supersede domain-name "...."


Uncomment that line, substitute the name supersede for append, then add the domain names you wish to search (follow the example below and leave a space after the first "):



append domain-name " ubuntu.com ubuntu.net test.ubunut.com";


Save the file and close.



All you need to do is restart your network connection. You can do this by unplugging and plugging in the physical network connect OR disable and enable your network connect (see picture below). After that you should be good to go:



To verify:



sudo cat /etc/resolv.conf


Disconnect Network



enter image description here



Connect Network



enter image description here


[#38517] Sunday, April 16, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uestred

Total Points: 464
Total Questions: 104
Total Answers: 112

Location: Israel
Member since Wed, Apr 14, 2021
3 Years ago
uestred questions
;