Aleksandar's computer workshop
Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

How to change Name Server (DNS Client) Settings under Linux

February 29, 2008 21:05 by Aleksandar
In order to be able to use conical names you have to use name servers (also called DNS servers) which will convert some name into IP address. I will here show you where are configuration files under Linux

Edit /etc/resolv.conf which can like this:
nameserver 192.168.1.1
nameserver 10.0.0.138

Also you might hardcode some IP's in hosts file. It looks like this:
127.0.0.1 localhost.localdomain localhost
194.109.6.67 ns.xs4all.nl

To have your new settings valid you have to restart the computer or do this in command line which will restart all your network services and devices:

/etc/init.d/network restart

If you are connected with SSH be patient connection will be restored.