Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I install libvirt-bin and ubuntu-virt-server, etc., my resolv.conf gets overwritten by dnsmasq about every hour.

I haven't installed network-manager and resolvconf. When I search for dnsmasq I see that only dnsmasq-base has been installed.

When I try to remove dnsmasq-base, libvirt-bin will be removed automatically.

How to keep dns config not be changed?

I use ubuntu 11.10

thanks for every reply.


$ dpkg --list | grep dnsmasq
$ ii  dnsmasq-base    2.57-1ubuntu1    A small caching DNS proxy and DHCP/TFTP server

$ pgrep dnsmasq

in my syslog file:

dnsmasq[1088]: reading /etc/resolv.conf
dnsmasq[1088]: using nameserver
share|improve this question
can you check if dnsmasq is running? pgrep dnsmasq – skyronic Mar 2 '12 at 18:48
AFAIK, dnsmasq doesn't modify resolv.conf. Perhaps you've also got resolvconf installed? The resolvconf package definitely will modify resolv.conf. You can check by running "dpkg --list | grep resolv" – cqcallaw Mar 2 '12 at 18:52
I found these in my syslog file: dnsmasq[1088]: reading /etc/resolv.conf, dnsmasq[1088]: using nameserver – Tony Lee Mar 2 '12 at 19:12
and I'm sure I haven't install resolvconf – Tony Lee Mar 2 '12 at 19:13
and I searched for dnsmasq and dnsmasq-util,they are not instelled too, only dnsmasq-base is installed – Tony Lee Mar 2 '12 at 19:15

Not dnsmasq but some other package was overwriting /etc/resolv.conf. See /usr/share/doc/resolvconf/README.gz in the resolvconf package for an incomplete list of packages that overwrites /etc/resolv.conf.

As of Ubuntu 12.04 the resolvconf package is part of the base system and resolvconf mediates access to /etc/resolv.conf. See resolvconf(8).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.