lock resolv.conf in ubuntu or another linux
to lock your resolv.conf
Bug Description
Binary package hint: network-manager
This bug causes name resolution to be painfully slow. If I manually remove the routers ip from resolv.conf it works normally, but next time the machine is booted the address gets added to the list again. I found the only way around this was to lock the file. “sudo chattr +i /etc/resolv.conf” so that network manager would not re-edit the file upon boot. I have seen this problem many times on the forums, and believe it should be made a priority to fix this. This “slow internet” gives people a horrible first impression of Ubuntu, and seems it would be easy enough to to fix. Thank you for our time.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: network-manager 0.8-0ubuntu2
ProcVersionSignature: hostname 2.6.32-18.27-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-18-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
Date: Tue Apr 6 00:42:02 2010
Gconf:
IfupdownConfig:
auto lo
iface lo inet loopback
InstallationMedia: Ubuntu 10.04 “Lucid Lynx” – Beta amd64 (20100318)
IpRoute:
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.5 metric 1
169.254.0.0/16 dev eth0 scope link metric 1000
default via 192.168.2.1 dev eth0 proto static
Keyfiles: Error: [Errno 2] No such file or directory
ProcEnviron:
LANG=en_US.utf8
SHELL=/bin/bash
RfKill:
SourcePackage: network-manager
sudo chattr +i /etc/resolv.conf
after this command your resolv.conf file will be locked and the file will not change on boot, or after create new connection