Can not edit etc hosts?

Can not edit etc hosts?

The best way I have found to change hosts settings is to:

  • Make a duplicate (which you already have done)
  • Move the duplicate to a new location, such as the desktop.
  • Delete or rename the “hosts” file in /etc to “hosts OLD”
  • Drag “hosts” from the desktop to /etc. ( you may be asked for admin credentials)

How do I edit etc hosts file?

Use the following instructions if you’re running Linux:

  1. Open a Terminal window.
  2. Enter the following command to open the hosts file in a text editor: sudo nano /etc/hosts.
  3. Enter your domain user password.
  4. Make the necessary changes to the file.
  5. Press Control-X.
  6. When you are asked if you want to save your changes, enter y.

Can not save hosts file?

Contact the administrator to obtain permission” error. Hit the start menu or press the Windows key and start typing Notepad. Right-click Notepad and choose Run as administrator. Now you’ll be able to edit and save changes to your HOSTS file.

How do I edit the / etc / hosts file?

You should use sudo -i (nano for text-based or gedit for graphical) /etc/hosts. By default normal users should not be able to edit the hosts file. Changing the ownership of hosts is not the right thing to do. file.txt is the file you want to edit.

What to do when unable to save hosts file?

That way, unable to save hosts file issue will be resolved. It can be a hassle to open the Notepad as an administrator and then edit the Hosts file. To make things easier, I recommend you use a free portable tool called BlueLife Hosts Editor.

How do I change the hosts file in Windows 10?

1) On your computer, go to the Hosts file location, C:WindowsSystem32Driversetc and right-click on it and open with notepad. 2) Modify the hosts file as your requirements and after that press Ctrl+S or click Save from File menu to apply the changes. 3) Unfortunately, you can’t save this file now.

How do I save a modified hosts file?

Once done, select “File → Save” or press Ctrl + S keyboard shortcut to save the modified hosts file. Unlike before, you can save the hosts file because you are editing the hosts file with administrative rights. That is the reason why we opened the Notepad as an administrator.