How to edit hosts file on Mac OS X EI Capitan, Yosemite, Server

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 1: Open Finder on Mac, where you want changes on host file. Or type finder on spotlight search.Edit hosts file on Mac from finder

Step 2: From Top menu, go to the GO > GO TO FOLDER.

Step 3: Move to Hosts files location type in text box: /private/etc/hosts and Click on Go.Go to hosts file on Go to menu

Step 4: double click on file named hosts, File will be open in text editor.Hosts file Location on Mac OS X

Step 5: Inside the hosts file you can edit after broadcasthost.Type or edit on hosts file

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.New copy of host file on Mac

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.

Type in terminal: sudo nano /private/etc/hostsMake changes or edit hosts file using sudo command

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.

LEAVE A REPLY