How do I edit /etc/resolv.conf file in CentOS Linux?
You need to use the text editor such as vi / vim or joe make changes to /etc/resolv.conf file. You must be logged in as root user in order to change this file. The /etc/resolv.conf is resolver configuration file. You can set nameserver ip address and domain search query name in this file.
Edit File Using Vi or Joe Text Editor
Type the following command:
vi /etc/resolv.conf
OR
joe /etc/resolv.conf
Edit as follows and set name server IP address:
search dnsknowledge.com nameserver 69.9.190.5 nameserver 69.9.162.17
Save and close the file. Test new settings either with dig or host command:
dig google.com host google.com dig dnsknowledge.com
{ 2 comments… read them below or add one }
Thanks it was helpful!!
thanx a lot!