I was adding entries to my hosts file on Windows 10 and I got an Access is Denied message when I saved the file in Notepad. Here are 2 quick ways to edit system files.
1) Right+Click Command Prompt or Notepad and Run as Administrator (old faithful)
2) From the Command Line, as Administrator, start notepad.exe “hosts” (from the etc folder of course) or for more bang for your buck, open notepad++ with start notepad++.exe “hosts” if you have it installed.