avatar
config DNS Linux

Remove file resolv.conf and these establishing inside it.

sudo rm /etc/resolv.conf

Create a new file resolv.conf by touch command.

sudo touch /etc/resolv.conf

Edit the file with resolv.conf.

sudo nano /etc/resolv.conf

# Hard-code DNS resolver to Google's servers
#
# *Setup*


# # download this file while DNS is working
# curl https://gist.github.com/turadg/7876784/raw --output ~/google-resolv.conf
# # replace your old DNS resolver
# sudo cp /etc/resolv.conf /etc/resolv.conf.auto && sudo mv ~/google-resolv.conf /etc/resolv.conf
# # make it uneditable so Vagrant doesn't clobber it
# sudo chattr +i /etc/resolv.conf


nameserver 8.8.8.8
nameserver 8.8.4.4
24
You need to login to do this manipulation!