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:
Edit as follows and set name server IP address:
search dnsknowledge.com nameserver 188.8.131.52 nameserver 184.108.40.206
Save and close the file. Test new settings either with dig or host command:
dig google.com host google.com dig dnsknowledge.com