Set DNS server on LXDE (Ubuntu)

lxdeI prefer the Google DNS servers ( for faster DNS resolution. While the procedure to set it on Unity is trivial, setting it on LXDE needs little more effort.

  1. Edit /etc/NetworkManager/NetworkManager.conf and comment out the line starting with dns.
  2. Edit /etc/resolv.conf and add the preferred nameservers before any other entries.
  3. Reboot and ensure the settings took effect.
    $ nslookup

This procedure is tested on Ubuntu 14.04 (aka Trusty Tahr).

Get your own domain name

cool_penguin_smallIf you are interested in getting your own domain name for free you can try the following two options depending on the type of hosting you have:

  1. If you have your site hosted somewhere other than your own storage is a good option. You can register a domain name like It is free with some basic mandates. No Ads. also supports if you have your site hosted in your own computer but I liked the second option more for this scenario.
  2. If your system is on 24×7 this is the free service you can opt for. It works whether your IP is static of dynamic. It has it’s own client software for Linux, Windows and Mac which pings back to update the IP. No Ads.

Modify DNS server address on Ubuntu

My ISPs DNS server responds slowly. So I was trying to modify /etc/resolv.conf on Ubuntu 12.04 with Google’s DNS server IPs (, as usual. To make the change permanent I ran chattr +i on the file but it failed. I found that in Ubuntu 12.04 it is a symbolic link to the following file:

/run/resolvconf/resolv.conf and /run is mounted as tmpfs in RAM.

Simple solution to add the DNS IPs using the GUI:

NetworkManager (in taskbar)  Edit Connections…  Select used connection  Edit…  IPv4 Settings  Method: Automatic (DHCP) addresses only [if your conneciton is DHCP based, otherwise select Manual]  Add the IPs (separated by comma) in DNS servers: field.

Quick tip: If you are using ADSL modem, you can set the Primary and Secondary DNS in the modem. Most modems support it nowadays.