This is more of a meta comment. I put
[CustomHosts]
127.0.0.1 localhost.ip4
::1 localhost.ip6
in /etc/systemd/resolved.conf.d/custom-hosts.conf / /etc/hosts/ (sans the header) to make it a 1 character edit to switch between localhost ipv4 and localhost ipv6.





I meant, the
/etc/hostsfile doesn’t need the[CustomHosts]header.