Hosts file has an important role on website configuration. So you can made own rules about your website hosted on Local mac running on OS X EI Capitan, Yosemite or OS X Server. Point IP address to the desired website URL So you can override DNS temporary by making changes in hosts file located on Mac System. For Edit hosts file on Mac, we need little technical knowledge, and then you can do with ease. However, to edit hosts file follow the below steps carefully.
Note: Before make changes please take backup of your hosts files or copy lines of text on to another text file.
Here you have two frequent solutions that might be very useful on Edit hosts file on Mac OS X or OS X Server.
Useful: Best Dictation software for Mac.
Steps on how to edit hosts file on Mac OS X: EI Capitan, Yosemite, Or OS X Server
Apple didn’t make any changes on path of hosts file location and Command syntax for older OS X version. Same steps you can try on any OS X version.
Step 2: From Top menu, go to the GO > GO TO FOLDER.
Here I redirected twitter account to another website ip for my Mac only. Not work on other Mac. Before Edit file you have make new copy of host file and changes will be saved to new copy. Then you have to replace that new file with original file (/private/etc/hosts) manually. Due to privacy reason you can’t make changes directly on original hosts file.
Second: Using Terminal, Sudo command for edit hosts file on Mac
Open terminal on Mac, Type terminal on spotlight search.
Enter Mac Admin password and press return.
Host file will be on screen, looks like above. get More help on commands.
You can make changes by short cut keys give on screen.
That’s it. Nothing else. Want more help on Edit hosts file on Mac OS X EI Capitan, Yosemite or OS X Server. Share with me on comment.