Windows 10: Syncing Windows hosts file with WSL 2 hosts file.

Discus and support Syncing Windows hosts file with WSL 2 hosts file. in Windows 10 Ask Insider to solve the problem; If I add a new entry to the Windows hosts file, then on restarting WSL 2, the hosts file for WSL is autogenerated based on Windows’ host file. If I add... Discussion in 'Windows 10 Ask Insider' started by /u/thefirstme, Dec 11, 2020.

  1. Syncing Windows hosts file with WSL 2 hosts file.


    If I add a new entry to the Windows hosts file, then on restarting WSL 2, the hosts file for WSL is autogenerated based on Windows’ host file. If I add a new entry to WSL’s host file, is it possible to add that entry to Windows’ host file also?

    submitted by /u/thefirstme
    [link] [comments]

    :)
     
    /u/thefirstme, Dec 11, 2020
    #1

  2. Hosts file editing

    I have to jump in and say I use, and have used the host file for years. It's an easy way to take stress off of old name servers. I don't add everything, but major shares I do add to the host file. I've used the host file for some tunneling as well. I try to optimize my network as much as possible and I have a solid network. But Easy Rhino is right as well, you'll want to have everything he suggested as well. *Toast :toast:
     
    Mindweaver, Dec 11, 2020
    #2
  3. Hosts file

    Can i use the hosts file(found in windows/system32/drivers/etc) to link localhost to an ip address.
     
    binsky3333, Dec 11, 2020
    #3
  4. Flava0ne Win User

    Syncing Windows hosts file with WSL 2 hosts file.

    Editing the hosts file in Windows 7

    I recently just upgraded to Windows 7 Ultimate 64-bit Edition and I need to edit the hosts file located in C:\Windows\System32\drivers\etc\. I've done this before on XP and Vista Ultimate 64-bit by opening the hosts file with Notepad. Only this time, when I opened it up with Notepad on Windows 7, it looked like this:

    Code: # Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost[/quote] Where as on XP and Vista, it would look like this:

    Code: Copyright (c) 1993-2008 Microsoft Corp. This is a sample HOSTS file used by Microsoft TCP/IP for Windows. This file contains the mappings of IP addresses to host names. Each entry should be kept on an individual line. The IP address should be placed in the first column followed by the corresponding host name. The IP address and the host name should be separated by at least one space. Additionally, comments (such as these) may be inserted on individual lines or following the machine name denoted by a '#' symbol. For example: 102.54.94.97 rhino.acme.com # source server 38.25.63.10 x.acme.com # x client host localhost name resolution is handled within DNS itself. 127.0.0.1 localhost ::1 localhost[/quote] So if I were to insert a line into the hosts file in Windows 7, would I have to add the # before the line or can I just simply put the line in without adding the # before it?
     
    Flava0ne, Dec 11, 2020
    #4
Thema:

Syncing Windows hosts file with WSL 2 hosts file.

Loading...
  1. Syncing Windows hosts file with WSL 2 hosts file. - Similar Threads - Syncing hosts file

  2. host file

    in Windows 10 Gaming
    host file: hi there i am trying to edit or add line in host file, long time ago since i did it and when i did there was lot of lines in there, i tried or looked last night could not see anything except this am i missing something please can somebody help and advise me please...
  3. host file

    in Windows 10 Software and Apps
    host file: hi there i am trying to edit or add line in host file, long time ago since i did it and when i did there was lot of lines in there, i tried or looked last night could not see anything except this am i missing something please can somebody help and advise me please...
  4. Host File

    in Windows 10 Network and Sharing
    Host File: Im trying to block toxic sites that i just unheathly go to, by setting this up of what i found of a way to block, and then i was going to turn me to standard and have my friend be admin but for someone reason it still saids i dont have permission. what am i doing wrong iv...
  5. Host File

    in Windows 10 Gaming
    Host File: Im trying to block toxic sites that i just unheathly go to, by setting this up of what i found of a way to block, and then i was going to turn me to standard and have my friend be admin but for someone reason it still saids i dont have permission. what am i doing wrong iv...
  6. Hosts file

    in Windows 10 Ask Insider
    Hosts file: Greetings, I have my hosts file that’s corrupted and can’t open with notepad and tried to give permission but there’s nothing to add or grant it’s empty I tired to use a software to unlock it and says cannot find path windows/system32/drivers/etc I’ve tried to boot in safe...
  7. Vanilla hosts file ( hosts file not working )

    in AntiVirus, Firewalls and System Security
    Vanilla hosts file ( hosts file not working ): Hi I keep getting this symptom from time to time , it fixes with windows updates but then occasionally come back . I have a list of advertising and malware websites that I filter through hosts file that are often used by a chat client as per the chat client community...
  8. Hosts file

    in Windows 10 Network and Sharing
    Hosts file: How can I reset the Hosts file back to the default? pls Is This good? 30362
  9. Hosts file

    in Windows 10 Support
    Hosts file: should the Hosts file be made read only ? 51243
  10. Hosts file

    in Windows 10 Support
    Hosts file: I am embarrassed that I forgot on change from Windows 7 to 10 I forgot until now to remember that only the sample Hosts file was installed. Now I cannot recall where the more comprehensive version came from or how to install it. Please advise me. 97081