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..
Asked
Active
Viewed 4.9k times
9
4 Answers
10
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

Pace
- 209
- 1
- 5
4
For static ipaddresses this can be defined in /etc/network/interfaces
eg:
dns-search na.my-domain.net
see What does the dns-search option mean in /etc/network/interfaces?
1
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.

jdthood
- 12,467
0
I have achieved this by adding...
append domain-name "na.my-domain.net";
to..
/etc/dhcp/dhclient.conf
and then...
sudo restart network-manager

Jordan
- 669
- 1
- 5
- 12
search mydomain.tld
in/etc/resolv.conf
– Hennes Aug 06 '13 at 08:43