Linux Setup DNS

Setting up the DNS in Linux can be done in a few steps.

sudo cp /etc/resolv.conf /etc/

Now edit the dhclient

sudo gedit /etc/dhcp3/dhclient.conf

Look for the below line, which will be commented, and match this setting.

# append the following line to the document
prepend domain-name-servers,;
sudo ifdown eth0 && sudo ifup eth0

Last line can also be done manually by just disable wireless and enable it from GUI.
You might be able to do this in the GUI as well depending on which Linux distrubtion you’re using.

Posted in Linux, Tips and Tricks Tagged with: ,