![hosts file editor for mac hosts file editor for mac](https://cdn.osxdaily.com/wp-content/uploads/2016/01/editing-hosts-file-textedit-mac-os-x.jpg)
You can also type a comments to your host mappings. You can navigate the hosts file with arrows keys. Now you are able to edit current host mappings, or type new ones. The hosts file will be opened in GNU nano text editor for Terminal. You will be prompted to your administrator password. Type sudo nano /private/etc/hosts to Terminal command line. Navigate to the Applications folder → Utilities and double click on Terminal.app application (also can type Terminal to Spotlight search). However, you can use Terminal application that has permissions to edit hosts system file. Hosts file on Mac protected against re-write and cannot be simply edited by TextEdit or other text editors.
#Hosts file editor for mac how to#
How to edit hosts file in macOS / OS X operating system The # symbol indicates comments, that provide information for users. # localhost is used to configure the loopback interface The Hosts file is stored in a simple text file format and can be found as "hosts" without any file extension in the /private/etc folder.Įxample of standard hosts file on Mac without any modifications: It can also be abused by malware to redirect domain, for things like phishing your Internet banking to other IP address to steal your bank account password. Whether there is not relevant host map to URL, it resolves the IP address via DNS servers.
![hosts file editor for mac hosts file editor for mac](https://blog.pcrisk.com/images/stories/blog/2018/how-to-modify-hosts-file-on-mac/introduction.jpg)
If you enter any URL in the web browser, the system first checks the hosts file.
![hosts file editor for mac hosts file editor for mac](https://i1.wp.com/www.alphr.com/wp-content/uploads/2020/07/20131215_edithostsfileosx_v2.jpg)
Often it is being modified to block malicious sites or sites with inappropriate content, for web development, to redirect domain names to local addresses etc. Hosts file is IP network protocol configuration file used by operating system to map the hostnames to IP addresses.