systemd and DNS
For systemd < v239 (18.04 and earlier):
systemd-resolve
For >= v239 (20.04 and later):
resolvectl
Set DNS
systemd-resolve --set-dns 1.1.1.1 --interface eno1
resolvectl dns eno1 1.1.1.1
Remove DNS entry
resolvectl dns eno1 ''
For systemd < v239 (18.04 and earlier):
systemd-resolve
For >= v239 (20.04 and later):
resolvectl
systemd-resolve --set-dns 1.1.1.1 --interface eno1
resolvectl dns eno1 1.1.1.1
resolvectl dns eno1 ''