Edit host file in mac

terminal mac

Step 1:  Open terminal and type following command and press enter key.

sudo nano /private/etc/hosts

terminal mac

Step 2: edit file according to your requirement. make sure that after  IP address gives a space.

mac terminal

step 3: Press control + o

press control + x

then terminal will be exit.

To update changes clear the cache by typing following command in terminal.

dscacheutil -flushcache 


check website in browser.

watch full video steps in youtube.


Recommended Articles

Leave a Reply

Your email address will not be published. Required fields are marked *