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-nameservers 192.168.0.1 192.168.0.2
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 188.8.131.52 # dns-nameserver 184.108.40.206 # dns-nameservers 220.127.116.11 18.104.22.168 # 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)