nano /etc/hostsEnter your domain, user, password and make changes. To save it Press Ctrl+X and answer with Y.
sudo nano /private/etc/hostsWhen prompt type domain, user, and password. Edit the hosts file and save changes by pressing CTRL+X.When prompt answer Y. To get effect run:
dscacheutil -flushcacheYou have successfully Modify your hosts file in Linux, Windows, and Mac. Enjoy!