11

resolvectl is no longer part of the bionic systemd package:

bionic search for resolvectl

cosmic search for resolvectl

I'm curious why it was removed and what we should be using as an alternative?

ericx
  • 243
  • 1
  • 3
  • 11

2 Answers2

18

resolvectl was never part of the systemd package in Bionic. Per the systemd changelog, systemd-resolve was renamed to resolvectl in systemd 239, but Bionic has systemd 237. Thus in Bionic it is systemd-resolve.

royarisse
  • 125
  • 6
fkraiem
  • 12,344
  • 4
  • 33
  • 38
1

The syntax is a bit different from systemd-resolve (please check man resolvectl)

# Reset interface dns settings
sudo resolvectl revert your_interface

# Sets your_dns_ip on a your_interface
sudo resolvectl dns your_interface your_dns_ip

# Sets your_domain_name on a your_interface
sudo resolvectl domain your_interface your_domain_name

# Check
sudo resolvectl dns
sudo resolvectl domain
Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117