0
I tried multiple ways to edit hosts file on Windows but failed.
First the hosts file seemed to appear, when using PowerShell, but the whole \etc\ directory disappeared when using any other tool. But because I don't know how to open as admin in PowerShell (I guess it's not possible), I just created a new etc directory with notepad run as an admin.
But now the information provided in hosts isn't used by any program (browser or putty). As a Unix nerd, this is very frustrating to me. How can I edit it on Windows 10? I also wouldn't mind some GUI thing hidden somewhere deep in the Settings app providing the same functionality.
/etc/hosts is something that exists in linux, not windows 10 as far as I'm aware. Where are you trying to edit this file? Your question is currently un clear. – djsmiley2k TMW – 2017-03-24T12:46:47.367
3It exists under
C:\windows\system32\drivers\etc\hosts
on every Windows machine. – hgiesel – 2017-03-24T12:48:06.380If you want to run something as administrator in PowerShell, then start PowerShell itself as administrator. – LPChip – 2017-03-24T12:56:56.683
You have to open your text editor as an Administrator that's the only way. – Ramhound – 2017-03-24T12:59:06.427
@Ramhound its not the only way. It is possible to set the rights properly and then you don't need to. There's a plugin for Chrome which will request changing rights in order for it to work, and then you don't need administrative permissions anymore. – LPChip – 2017-03-24T13:44:08.630
@LPChip - I was not aware of that. – Ramhound – 2017-03-24T15:03:51.017