dscl – The Easy Way to Add Hosts on OS X(tomafro.net)1 points·by gpantazes·3 lata temu·1 commentstomafro.netdscl – The Easy Way to Add Hosts on OS Xhttps://tomafro.net/2009/07/dscl-the-easy-way-to-add-hosts-on-osx1 commentsPost comment[–]gpantazes·3 lata temureplyI noticed that the default /etc/hosts file has a comment saying not to alter the localhost. # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost It made me wonder what alternatives there were for adding additional hostnames for the loopback IP.This article on dscl (https://tomafro.net/2009/07/dscl-the-easy-way-to-add-hosts-o...) is one such finding.If anybody has suggestions about the best way to add hostnames for testing/override purposes, whether that's /etc/hosts or something else, please comment with your favorite.
It made me wonder what alternatives there were for adding additional hostnames for the loopback IP.
This article on dscl (https://tomafro.net/2009/07/dscl-the-easy-way-to-add-hosts-o...) is one such finding.
If anybody has suggestions about the best way to add hostnames for testing/override purposes, whether that's /etc/hosts or something else, please comment with your favorite.