How to add/edit additional search entry in /etc/resolv.conf











up vote
0
down vote

favorite












I have the below entries in my /etc/resolv.conf



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


How can I add new entry to search? Like below



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal. XXXX.service.
nameserver XX.XX.XX.XX


I tried the below workaround, Installed,



sudo apt-get install resolvconf


and then edited,



sudo gedit /etc/resolvconf/resolv.conf.d/base


However, this will will update resolv.conf as below



# more /etc/resolv.conf
search XXXX.service.
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


I wanted search to be update in single line.



OS: Details
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"









share|improve this question









New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
    – pbhj
    Dec 6 at 17:18















up vote
0
down vote

favorite












I have the below entries in my /etc/resolv.conf



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


How can I add new entry to search? Like below



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal. XXXX.service.
nameserver XX.XX.XX.XX


I tried the below workaround, Installed,



sudo apt-get install resolvconf


and then edited,



sudo gedit /etc/resolvconf/resolv.conf.d/base


However, this will will update resolv.conf as below



# more /etc/resolv.conf
search XXXX.service.
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


I wanted search to be update in single line.



OS: Details
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"









share|improve this question









New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
    – pbhj
    Dec 6 at 17:18













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have the below entries in my /etc/resolv.conf



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


How can I add new entry to search? Like below



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal. XXXX.service.
nameserver XX.XX.XX.XX


I tried the below workaround, Installed,



sudo apt-get install resolvconf


and then edited,



sudo gedit /etc/resolvconf/resolv.conf.d/base


However, this will will update resolv.conf as below



# more /etc/resolv.conf
search XXXX.service.
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


I wanted search to be update in single line.



OS: Details
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"









share|improve this question









New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have the below entries in my /etc/resolv.conf



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


How can I add new entry to search? Like below



# more /etc/resolv.conf
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal. XXXX.service.
nameserver XX.XX.XX.XX


I tried the below workaround, Installed,



sudo apt-get install resolvconf


and then edited,



sudo gedit /etc/resolvconf/resolv.conf.d/base


However, this will will update resolv.conf as below



# more /etc/resolv.conf
search XXXX.service.
domain c.XXXX-XXXX-XXXX.internal
search c.XXXX-XXXX-XXXX.internal. XXXX.internal.
nameserver XX.XX.XX.XX


I wanted search to be update in single line.



OS: Details
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"






16.04






share|improve this question









New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 7 at 4:36





















New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 6 at 16:51









Sunil Gajula

11




11




New contributor




Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Sunil Gajula is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
    – pbhj
    Dec 6 at 17:18














  • 1




    This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
    – pbhj
    Dec 6 at 17:18








1




1




This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
– pbhj
Dec 6 at 17:18




This is substantially different for newer systems. You should probably specify your specific system in the question, is it really 12.04. Upgrade!
– pbhj
Dec 6 at 17:18















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Sunil Gajula is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098970%2fhow-to-add-edit-additional-search-entry-in-etc-resolv-conf%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Sunil Gajula is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Sunil Gajula is a new contributor. Be nice, and check out our Code of Conduct.













Sunil Gajula is a new contributor. Be nice, and check out our Code of Conduct.












Sunil Gajula is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098970%2fhow-to-add-edit-additional-search-entry-in-etc-resolv-conf%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b