Steven Black's unified hosts file with base extensions includes the following block in the beginning:
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 local
255.255.255.255 broadcasthost
::1 localhost
::1 ip6-localhost
::1 ip6-loopback
fe80::1%lo0 localhost
ff00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
0.0.0.0 0.0.0.0
Which defines three records for localhost (I didn't even know it's valid to include more than one record for the same domain name) and a number of other records I'm not sure should be there (I actually thought a hosts file should be empty unless you have a reason to override something or define a custom domain name).
What does every of these lines mean, in what cases may it be applied and why should it be included in a hosts file?
localhost(unless of course it is removed). It is perfectly valid to define the same hostname for multiple IP addresses. – Ramhound Feb 19 '19 at 20:45