This guide will show you how to enable and disable the systemd-resolved service in Ubuntu.
What is systemd-resolved?
systemd-resolved is a systemd service that provides network name resolution to local applications. Additionally, systemd-resolved is installed by default as part of the systemd package.
systemd-resolved provides the following resolver services:
- Domain Name System (DNS, DNSSEC and DNS over TLS)
- Multicast DNS
- Link-Local Multicast Name Resolution
Why would you disable it?
You may want to disable systemd-resolved so that you can use another resolver on the same host. For example, you must do this before installing PiHole as the alternative DNS server.
You need to disable one DNS service since you cannot have two services listening on the same port.
Changes as of Ubuntu 18.04
Netplan is now the default network management tool as of Ubuntu 18.04. Netplan replaces the /etc/resolv.conf and /etc/network/interfaces configuration files used to configure the network.
How to disable systemd-resolved in Ubuntu
Run the following commands to disable and stop the systemd-resolved service:
sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved.service
How to enable systemd-resolved in Ubuntu
Run the following commands to enable and start the systemd-resolved service:
sudo systemctl enable systemd-resolved.service sudo systemctl start systemd-resolved.service
You may also be interested in
About the Authors
Anto's editorial team loves the cloud as much as you! Each member of Anto's editorial team is a Cloud expert in their own right. Anto Online takes great pride in helping fellow Cloud enthusiasts. Let us know if you have an excellent idea for the next topic! Contact Anto Online if you want to contribute.
Support the Cause
Support Anto Online and buy us a coffee. Anything is possible with coffee and code.