The trick is largely the same as Text Edit, still requiring the use of sudo, but changing the specified application name as follows. Users can also choose to modify Mac OS X’s /etc/hosts with TextWrangler, BBEdit, or another third party application. You’ll likely want to clear out your DNS cache after modifying the hosts file, here’s how to flush DNS in Mac OS X El Capitan and modern versions Mac OS and how to do the same in prior releases. It’s also a good idea to set plain text mode as the default for TextEdit. It’s good practice to make a duplicate of the hosts file so that if you break something you can easily fix it, though we’ve got the original default hosts file here in case you need to restore it. 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. You can turn off SIP in Mac OS X with these instructions, which requires a reboot of the Mac. * If the hosts file shows as “locked” and won’t save changes despite being launched through sudo, it’s likely because you didn’t disable SIP as mentioned in the introduction. Quit out of TextEdit, then quit out of Terminal when finished.The /etc/hosts file will launch into TextEdit as a plain text file where it can be edited and modified as need be, when finished use File > Save or hit Command+S as usual to save the changes to the hosts document *.Hit return and enter the admin password for Mac OS X when requested to authenticate the launch through sudo.Enter the following command exactly to open the Macs hosts file within the TextEdit GUI application.Launch the Terminal application in Mac OS X, found within /Applications/Utilities/.For Mac users who are running MacOS X 10.11 or later releases, you must first disable SIP protection however, otherwise the Mac /etc/hosts file will be locked when attempting to access it from TextEdit. This approach to changing /etc/hosts with TextEdit works with any version of Mac OS X. How to Modify the Mac Hosts File at /etc/hosts with TextEdit Mac OS An incorrectly formatted hosts file or improper entry can lead to DNS issues and problems with various internet services. If you don’t have a specific reason to modify the Mac hosts file in macOS / Mac OS X, you should not do so.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |