I am using ubuntu 18.04 and am a new linux user. I am to install dnsmasq and everything is fine. But when I reboot, the /etc/resolv.conf file shows not the nameserver I have given( I want to change this permanently. Im stuck here. Can someone please help me. Thanks

1 Answer 1


Actually, shows that systemd-resolve is running. To properly set your preferred DNS nameserver, set it in Network Manager:

enter image description here

Restart Network Manager:

sudo service network-manager restart

Confirm the correct nameserver addresses:

resolvectl status | grep Server

Ideally, you will see:

Current DNS Server:
       DNS Servers:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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