Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

4 Answers 4

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

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

dns-search na.my-domain.net

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

share|improve this answer
1  
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. –  KasiyA Jan 29 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

I have achieved this by adding...

append domain-name "na.my-domain.net";

to..

/etc/dhcp/dhclient.conf

and then...

sudo restart network-manager
share|improve this answer

Your Answer

 
discard

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.