I am sure there are better ways to do this but this is what i have found allows me to do it easily
/usr/bin/dscl localhost -create /Local/Default/Hosts/#{hostname.local} IPAddress 127.0.0.1
I am sure there are better ways to do this but this is what i have found allows me to do it easily
/usr/bin/dscl localhost -create /Local/Default/Hosts/#{hostname.local} IPAddress 127.0.0.1