Post B1Ee5TxezUpI2c7EWW by gumnos@mastodon.bsd.cafe
 (DIR) More posts by gumnos@mastodon.bsd.cafe
 (DIR) Post #B1Ee5TxezUpI2c7EWW by gumnos@mastodon.bsd.cafe
       2025-12-13T22:26:11Z
       
       1 likes, 0 repeats
       
       TIL: $HOSTALIASES in FreeBSDApparently you can set the $HOSTALIASES environment variable in FreeBSD (and maybe some Linuxen? but not OpenBSD AFAICT) to point to an alternate hosts file (instead of the default /etc/hosts) for re-mapping particular hosts.  This would let you do something like$ HOSTALIASES=$HOME/hosts.txt myprogand any name-resolution that myprog(1) does will first consult the ~/hosts.txt file.https://man.freebsd.org/cgi/man.cgi?query=hostname&sektion=7