- open iTerm and type sudo nano /etc/hosts
- enter in password
- Type in the TCP/IP address
- Press the Tab key
- Type the domain name
- Save the file by pressing Ctrl + O (zero)
- Exit with Ctrl + X
— Update —
Just add this to your .aliases file so you can open up terminal and type hosts like our buddy Jeffry 🙂
alias hosts=”sudo nano /etc/hosts”