1. Edit resolved config file
nano /etc/systemd/resolved.conf
2. Replace #DNS into DNS
DNS=9.9.9.9 1.1.1.1
3. Restart systemd service
service systemd-resolved restart
4. Finally, check the status
systemd-resolve --status
2022-10-28 07:46:45
1. Edit resolved config file
nano /etc/systemd/resolved.conf
2. Replace #DNS into DNS
DNS=9.9.9.9 1.1.1.1
3. Restart systemd service
service systemd-resolved restart
4. Finally, check the status
systemd-resolve --status