HowTo: Edit The /etc/resolv.conf File in CentOS Linux

Type the following command:
vi /etc/resolv.conf

Edit as follows and set name server IP address:

nameserver 8.8.8.8
nameserver 8.8.4.4

Save and close the file. Test new settings either with dig or host command:

dig tocmail.net
host tocmail.net