← Back to context

Comment by cduzz

10 days ago

Unix predates DNS; the nsswitch.conf tells the c libraries how to convert names to IP addresses. This behavior is actually dependent on which libc you're using...

To resolve names, you can ask /etc/hosts for the name / IP conversion; you can also ask DNS, or ldap or NIS; probably there are many I've forgotten about.

solaris: https://docs.oracle.com/cd/E19683-01/806-4077/6jd6blbbe/inde...

glibc: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html

musl appears to not have an nsswitch.conf or a way to configure name to number resolution behavior?