How to add Primary and Secondary DNS server - /etc/resolve.conf - Linux
Just finished installed CentOS 5. but it can’t recognize any domain. Finally, found out i haven’t add any domain name server (DNS) in my machine. Below is the steps to add domain name server (DNS) in your machine using /etc/resolve.conf file:-
- Open file /etc/resolve.conf
- You should see something like this:-
search localhost.localdomain
Add your Primary and Secondary Domain Name server (DNS) ip at the end of the file and it should look like this:-
search localhost.localdomain
nameserver 888.888.888.888
nameserver 888.888.888.999 - Save the file and exit
- Done! you just added primary and secondary dns server in your machine.
- To check if your machine works fine, type ping techiecorner.com. If it has reply means your machine work well. If it show unknown host then your configuration has something wrong. Check and rectify it.
If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)








