![find hosts file mac os x find hosts file mac os x](https://i.ytimg.com/vi/Tw55UBv79X8/maxresdefault.jpg)
In our case, we want to block Facebook so we’ll map to 0.0.0.0 which, as an invalid IP address, will result in an error. To do this, type the IP address you wish to assign followed by a hostname. In our example, we’ll pretend that the computer we’re using is a work system, and we want to prevent employees from accessing Facebook (because we’re mean). To edit the file, you’ll add your own lines after broadcasthost.Ī popular use for an edited hosts file is to block access to specific websites. It also contains default IP values for localhost and broadcasthost. For each line, any text after the pound sign is ignored by the computer, making it a good way to add notes and descriptions to your files. It contains a number of lines of descriptive text which are “commented out” with the pound or number sign (#). By default, the hosts file is relatively simple. To open it, simply double-click and it will display the file’s contents in TextEdit (or the text editor of your choice). Click and drag it out of the Finder window and drop it on your desktop. private/etc/hostsĪ new Finder window will open and your Mac’s hosts file will be selected. In the box, type the following location and press Return. To find the hosts file, open Finder and, in Finder’s menu bar, select Go > Go to Folder. Instead, we need to copy the file to an unprotected location, like the Desktop, edit it, and then copy it back. However, you can’t open the file directly, since it resides in a protected area of the file system. The first is by using TextEdit, since the hosts file is merely a simple plain text document. There are two primary ways to edit the hosts file in Mac OS X.
![find hosts file mac os x find hosts file mac os x](https://iphonehelp.in/content/uploads/2011/09/host1.jpg)
#FIND HOSTS FILE MAC OS X HOW TO#
Here’s how to edit the Mac hosts file on OS X. Although the modern Internet uses a variety of public and private DNS servers to map IP addresses, the hosts file is a handy way to override those DNS servers, allowing you to manually point a website address to a desired IP address, or block access to a site altogether by pointing to an unused or internal IP address. Your Mac’s hosts file is a small, but important text document that has the ability to map hostnames to specified IP addresses.
![find hosts file mac os x find hosts file mac os x](https://i.ytimg.com/vi/sVAl0jqsFfs/maxresdefault.jpg)
To totally unlock this section you need to Log-in