You might want to change the DNS server if your ISP’s servers can sometimes be slow or outdated.

sudo gedit /etc/resolv.conf

and change or add the lines:

nameserver your_DNS1 nameserver your_DNS2

You can add as many lines like these, but two should be enough.

Test the used domain name servers careful!

#dns-nameserver 192.168.0.1

#dns-nameservers 192.168.0.1 192.168.0.2

#dns-search somedomain.org

#dns-domain 192.168.0.1

Edit: Serge’s comment (the first one) made me search a little bit.

After searching google it wasn’t totally clear if the DNS should be configured in resolv.cof or /etc/network/interfaces, so I took the GUI for a spin.

I’ve set up the DNS trough the GUI and checked the changes inside both locations.

The DNS servers I addes, became listed inside the /etc/resolv.conf file.

So after all, I was right.

But as the configuration file starts with the line #Generated by NetworkManager, I was wondering if these settings would get overwritten by the NetworkManager.

So I wiped all configured interfaces from my computer and let the NetworkManager try its evil.

It worked like a charm and just added the line ‘domain morraye.local’ to the file, without erasing my dns settings.

This was tested on Ubuntu 9.04 and Ubuntu 9.10.

You might also want to play with these settings in your resolv.conf file

# dns-domain 208.67.222.222 # dns-nameserver 208.67.222.222 # dns-nameservers 208.67.222.222 208.67.220.220 # dns-search wikipedia.org

Note: When you’re behind a router, you should change the dns server at your router (unless it uses pass-trough DNS lookups)