Disable systemd-resolved in Ubuntu with guidance from our in-house experts.
At Bobcares, we welcome queries, big and small as a part of our Server Management Service.
Let’s take a look at how our Support Team helped a customer disable their systemd-resolved in Ubuntu recently.
What is systemd-resolved in Ubuntu?
The systemd-resolved works like a systemd based DNS proxy system. It comes with intelligent request handling from a DNS server and a D-BUS.
This is done via a single localhost address in the /etc/resolv.conf file.
In fact, it is a system service that offers network name resolution to local applications. It sets in place a caching and validating DNS/DNSSEC stub resolver. Furthermore, it also sets up an LLMNR as well as a MulticastDNS responder and resolver.
Performance issues are one of the reasons why customers sometimes request us to help them disable the service.
How to disable systemd-resolved in Ubuntu?
According to our Support Engineers, the following steps will disable the service in Ubuntu:
- First, run these commands to disable systemd-resolved:
[email protected]:~$ sudo systemctl disable systemd-resolved.service [email protected]:~$ sudo service systemd-resolved stop
- Then, open the NetworkManager configuration file located at /etc/NetworkManager/NetworkManager.conf. Next, modify or add a new dns key as seen below:
- After that, remove the /etc/resolv.conf file with the following command:
[email protected]:~$ sudo rm /etc/resolv.conf
- Then, run this command to restart the NetworkManager:
[email protected]:~$ sudo service network-manager restart
- Finally, verify that the /etc/resolv.conf file has been recreated by the NetworkManager. Also ensure it has the DNS entries that match the network configuration:
[email protected]:~$ cat /etc/resolv.conf # Generated by NetworkManager search example.com nameserver 10.10.0.1 nameserver 10.10.0.2 [email protected]:~$
[Looking for assistance with another issue? We are here to help you out.]
To sum up, the skilled Support Engineers at Bobcares demonstrated how to disable Disable systemd-resolved in Ubuntu without too much trouble.