We can directly change the contents of the file but they dont seem to be in effect. So I added Google's nameserver in the file as follows :
$ sudo cat /etc/resolvconf/resolv.conf.d/base
nameserver 8.8.8.8
nameserver 8.8.4.4
And then updated the file as follows :
$ sudo resolvconf -u
we can also just update /etc/resolve.conf and it will be in effect immediately.
$ sudo sed -i '1 i\nameserver 8.8.8.8\nnameserver 8.8.4.4' /etc/resolv.conf
To remove the changes :
$ sudo sed -i '1,2d' /etc/resolv.conf
No comments:
Post a Comment