fi you're like me, you are visiting this page because you want to know how to change, add, edit, modify or simply setup you dns namesevers in your linux machine.

well, you're in luck, i will show you.

thanks for the folks at www.webune.com for their help on this question

the first step is to login as root, once you are in the shell command prompt enter this command:

If you want to change it, you can do the following command to edit the file (or you can use vi or other favorite editor. if you are a beginner like me, i would start with nano)

I will be using Red Hat for this demonstration:

cat /etc/resolv.conf
This will display your current ns or nameserver configuartion file

next if that's incorrect then you need to change them, then you can send this command:
nano /etc/resolv.conf


change it to your setting and then save it by hitting control + x

you will need to restart your dns server for the changes to take affect:
/etc/init.d/named restart

This command will display your Primary and Secondary Server Ip Address. It will look like this:


you can check your work
cat /etc/resolv.conf


OUTPUT
generated by /sbin/dhclient-script
search wallpaperama.com
nameserver 210.92.171.7
nameserver 210.92.179.16


done

*disclaimer: I take no responsability for any loss or damages to your server/data. Always make backups before you start doing something like this, no matter is you are and expert or a beginner.