- Service monitors /etc/hosts.d/*.conf files and updates /etc/hosts whether change.
- Arch Linux: in the AUR
- Manual
mkdir /etc/hosts.d mv /etc/hosts /etc/hosts.d/hosts.conf cp systemd-hosts.d.path systemd-hosts.d.service /etc/systemd/system systemctl enable --now systemd-hosts.d.path # Optionally you can store result in ram ln -sf /run/hosts /etc/hosts systemctl enable --now systemd-hosts.d.service