Many users edit and modify the hosts file so that they can point a domain to a different IP address, whether for the purpose of local development, blocking sites, or simply to access alternate servers from various apps and system level functions.
Unlock A File For Editing In Mac OS XUnlock A File For Editing In Mac OS X Terminal UsingMost advanced users will edit the hosts file from the Mac OS X Terminal using nano or vim, but for those who prefer to stay within the Mac OS GUI, you can also modify the Macs hosts file through TextEdit, or even a third party app like BBEdit or TextWrangler.
This offers a more user friendly option compared to going through the command line. An incorrectly formatted hosts file or improper entry can lead to DNS issues and problems with various internet services. For Mac users who are running MacOS X 10.11 or later releases, you must first disable SIP protection however, otherwise the Mac etchosts file will be locked when attempting to access it from TextEdit. You can turn off SIP in Mac OS X with these instructions, which requires a reboot of the Mac. This is necessary for modern versions of Mac OS X, though you can choose to edit the hosts file using the command line with nano as described here without adjusting SIP. Its also a good idea to set plain text mode as the default for TextEdit. The trick is largely the same as Text Edit, still requiring the use of sudo, but changing the specified application name as follows. If this is all over your head, perhaps you should not be editing a hosts file to begin with. I wouldnt expect an ipad or windows user to know that however, you have to be well versed in the Macintosh. If you dont know why youd want to edit the hosts file, you have no business editing the hosts file, and thus it could go wrong or inexplicably mess something up. I use VIM personally but for those who want a GUI, editing hosts with TextWrangler is the way to go. Those type of lists are unusable if youre in marketing, advertising, andor sales, where you need regular access to various web analytic and ad platforms. Im sure there are other websites youd also like to never see again, but facebook is the leader of useless crud if you were to ask me. Unlock A File For Editing In Update The HostsDownload TextWrangler, and (after backing up the default hosts file), update the hosts file to block many known malware, tracking, ad sites, etc., from here: (even though the URL says 2002 this list is regularly updated, and no its not a single fool-proof solution, but I found it helps in parallel with other security measures.). Some referral links may not work with this block list in place (since they typically chain tracking links), but you can selectively comment out (with a ) the sites you want to allow ifas you need them. TextWrangler does not have permissions to open the etchosts file or privateetchosts. Adjusting such a file with TextEdit could lead to saving it as an RTF or some other format which would render it inoperable and cause problems. Both work with Hosts file without disabling SIP or using sudo. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.
0 Comments
Leave a Reply. |