How to enable and disable systemd-resolved in Ubuntu

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:

How and why (not) to use the 127.0.0.53 nameserver, systemd-resolved and resolvctl Or what is syste…

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.

Pi-hole is an advertisement blocking application that acts as a DNS. It also blocks Internet trackers. Click here to learn more.

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.

Buy me a coffee



About Anto Online

Having started his career in 1999 as a Desktop Support Engineer, Anto soon changed paths and became a developer. After several years of development experience, he transitioned into a consultant. As an enterprise application consultant for a leading SaaS software provider, Anto specializes in AWS's serverless technologies. By day, Anto focuses on helping customers leverage the power of serverless technologies. By night, he indulges his passion for cloud computing by playing with Python and trying out things that are currently beyond the scope of his work. Sometimes Anto needs help as there are not enough hours at night. So Anto relies on a team of fellow Cloud enthusiasts to help him out. Each one is a Cloud expert in their own right, and Anto takes great pride in helping them learn and grow.

View all posts by Anto Online →

Leave a Reply

Your email address will not be published.