How To Unlock A File For Editing In Mac

How To Unlock A File For Editing In Mac 8,1/10 682 votes

The hosts file is one of the important network files of any operating system. We all know about DNS, which maps I.P. Address to a domain address.

Computers Managing locked files in OS X. If you can't edit a file in any application, including the Terminal, then it may have a lock flag associated with it.

For example, when you type in your browser URL, your internet connection queries DNS system of your I.S.P. To find the I.P. Address and thus serve website in your browser. This also brought the concept of Public DNS, which I have already discussed in detailed earlier (). Similarly, Hosts file is for your local computer. You can add custom detail in your Hosts file, and before checking DNS, your system will check operating system hosts file for any reference. For example, if you add Google.com I.P.

Preview Preview. Embed this Program Add this Program to your website by copying the code below. Adobe photoshop cs3 for mac os x 10.5.8.

Address for Facebook.com domain in your OS Hosts file, when ever someone will type Facebook.com in the browser URL, Google.com will be open in the browser. (A great idea for prank too).

Anyways, I will not get into detailed explanation of DNS and Hosts file, but if you are interested to learn these basics (you should), here are few articles for your reference: • • • (Can be used to find location of Hosts file in different computer OS) Editing Hosts file in Mac using Nano: At the time of writing this article, I’m using Mac 10.8.4, and whenever I try to edit the hosts file using Text editor, I see the Locked error. I couldn’t find any option to unlock the Hosts file, and edit it using Mac Text Editor. Here is the error that I got, while trying to edit hosts file. You don’t own the file “hosts” and don’t have permission to write to it. This is the default location of hosts file in Mac OS X: /private/etc/hosts And, here is the way to edit the file.

Open terminal and type this command: sudo nano /private/etc/hosts And it will ask your system password once you enter the password, you will see a screen like this: Nano is the terminal editor, and if you wish to learn all the commands of this editor, is a handy reference. Now, use your cursor to move, and edit the hosts file according to your requirement. Once you are done making changes, click on • Ctrl+ 0: Click Enter after that. (This will save your output) • Ctrl + X: This will exit the Nano editor. Update: You can download this Mac app call to edit hosts file quickly. It took me 15 minutes to find the solution to locked hosts file issue in Mac, and I hope this article will save your precious time.

If you are still stuck or have any question, feel free to ask me via comments. Do check out our other articles on general-tech, and you will learn something new today.

In OS X there are several ways to prevent access to files, including putting them in locked disk images or changing their permissions setting so only select accounts on the system are permitted to read them. In addition to these options, the OS X Finder supports another method of locking a file.