User specific host file
If you are managing a single-user environment, such as a shared MacBook, you could potentially have each user's .bashrc copy a base hosts file, then append their custom one to the end of it.  For example:

sudo cp /etc/common_hosts /etc/hosts  
sudo cat ~/my_hosts &gt;&gt; /etc/hosts


This would effectively give every user their own custom additions to the hosts file.  You can make it so a password isn't needed for these sudo commands by using the sudo visudo command and adding them to the allowed commands.  Here are some examples from the bottom of my sudoers file:

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now  


Under OS X, the /etc/hosts file is apparently dynamically read, so the net services would not need to be restarted.

mbp-c17189:~ root# ping goog
ping: cannot resolve goog: Unknown host
mbp-c17189:~ root# ping google.com
PING google.com (172.217.4.238): 56 data bytes
64 bytes from 172.217.4.238: icmp_seq=0 ttl=49 time=4306.507 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 1 packets received, 50.0% packet loss
round-trip min/avg/max/stddev = 4306.507/4306.507/4306.507/0.000 ms
mbp-c17189:~ root# echo 172.217.4.238     goog&gt;&gt;/etc/hosts
mbp-c17189:~ root# ping goog
PING goog (172.217.4.238): 56 data bytes
64 bytes from 172.217.4.238: icmp_seq=0 ttl=49 time=43.639 ms
^C
--- goog ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 43.639/43.914/44.189/0.275 ms
mbp-c17189:~ root#