Время создания: 20.09.2018 16:21
Текстовые метки: linux resolv.conf
Запись: Velonski/mytetra-database/master/base/1537442507qt9cwsh846/text.html на raw.githubusercontent.com
I need to setup Open DNS but i cant edit resolv.conf
Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
shareimprove this question
edited Oct 17 '13 at 16:31
asked Oct 17 '13 at 16:18
sudo vi resolv.conf – meda Oct 17 '13 at 16:21
add a comment
active oldest votes
Your system uses resolvconf, so the resolv.conf file is replaced by a symbolic link to /etc/resolvconf/run/resolv.conf and resolvconf dynamically generated the file. That's why DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
To properly update the information in the file, you can put the dns-* parameters in /etc/network/interfaces e.g.
iface eth0 inet static
dns-nameservers 184.108.40.206 220.127.116.11
Then, you can update the dns-* info by
$ resolvconf -d eth0
$ resolvconf -a eth0
Or you can do ifdown & ifup and resolvconf -d, -a will happen behind the scenes.
Note: sometimes I find resolvconf -u doesn't work. I don't know why
You should read man resolvconf. There's more information about all this.
TIP: if you want to update /etc/resolv.conf manually, you can remove the symlink and create /etc/resolv.conf by hand. This way, the file won't get updated from resolvconf ever.
$ rm /etc/resolv.conf ;# to remove the symlink
$ vi /etc/resolv.conf ;# to create a regular file
Так же в этом разделе: