Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed ubuntu 12.04. And I am a beginner on Linux. So, how can I add the DNS suffix in this OS. Please help..

share|improve this question
Right now I got no Ubuntu install to test this with, but the normal way to do this is by adding a new line with search mydomain.tld in /etc/resolv.conf – Hennes Aug 6 '13 at 8:43
Could you explain what you mean by DNS suffix? – Oli Aug 6 '13 at 9:21

For static ipaddresses this can be defined in /etc/network/interfaces eg:


see what does mean dns-seach option in /etc/network/interfaces

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Afshin Hamedi Jan 29 '15 at 7:44

In the past you did this by modifying /etc/resolv.conf. Now /etc/resolv.conf is managed by resolvconf. So now you do:

  • Create a file named /etc/resolvconf/resolv.conf.d/tail
  • Add the line search mydomain.tld to that file
  • Run sudo resolvconf -u
share|improve this answer

In Debian and Ubuntu the system hostname is a short name --- this name does not have a domain name suffix. Domain name suffixes for a machine are determined by DNS which is outside the machine itself.

Certain applications running on the local machine need to be given one or more fully qualified domain names for the local machine. Those applications should be configured accordingly.

share|improve this answer

I have achieved this by adding...

append domain-name "";



and then...

sudo restart network-manager
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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