Running Pihole on Ubuntu

Setting up a Pihole on modern Ubuntu requires modifying the systemd-resolved service to not listen on port 53. This is accomplished with some simple commands from the official docs:

sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
sudo systemctl restart systemd-resolved