GoWSL2Host Not Starting Featured Image

Similar Posts

8 Comments

  1. Sorry – completely confused. I have ubuntu wsl with kde desktop running perfectly. Now want to sort out wsl2host – BUT:

    1. Looking in services, wls2host does not appear there at all.

    2. Tried to install wsl2host.exe as per Shane’s Githib page. However, not sure where I am to download the binary to – Windows or Linux?

    3. Anyway I have downloaded it to wsl but can’t run it in any console or PowerShell. Trying to do the following:

    Open an elevated/administrator command prompt to run this:

    > .\wsl2host.exe install
    Windows Username:
    Windows Password:

    However, all terminals say the same thing – e.g. :
    [email protected]:~$ WSL2Host.exe install
    WSL2Host.exe: command not found

    [email protected]:~# . \wsl2host.exe install
    -bash: wsl2host.exe: No such file or directory (with space after full stop)

    or

    [email protected]:~# .\wsl2host.exe install
    .wsl2host.exe: command not found (no space after period)
    [email protected]:~#

    Any help appreciated

    Thanks

    Richard

    1. Hi Richard,
      WSL2Host runs on the Windows side, not the WSL side. It updates your Windows c:\windows\system32\drivers\etc\hosts file to create a local alias and IP address mapping for (for example) ubuntu2004.wsl so you can easily connect to it by name instead of address.

      It looks (from the command prompt copy and pasted) that you’re trying to run it in a WSL Bash session. You need to run it in a CMD session…

      Type CMD.EXE in the Windows search bar (bottom left, next to start button on a standard windows taskbar). Click ‘Run As Administrator’ in the search result for ‘Command Prompt’ that should come up…

      Hope that helps,
      Steve

  2. Sorry Steve, my bad.

    I should have also posted the attempts I had made with an elevated command prompt. These went nowhere as well. The wsl2host.exe file (v0.35) had been downloaded to my windows Download directory. I started a Command Prompt and ran the command: .\wsl2host.exe install

    C:\WINDOWS\system32> .\wsl2host.exe install

    This resulted in a large blue dialogue box that said: “This app can’t run on your PC. To find a version for your PC, check with the software publisher”. Closing that box then gave me an Access denied comment in the terminal:

    C:\WINDOWS\system32> .\wsl2host.exe install
    Access is denied.

    I found that this had also inserted a copy of the file in the C:\WINDOWS\system32 folder. Just on the off chance, I deleted that copy and reran the command with this result:

    C:\WINDOWS\system32> .\wsl2host.exe install
    ‘.\wsl2host.exe’ is not recognized as an internal or external command,
    operable program or batch file.

    No doubt you can put me right on what I am doing wrong!

    Thanks

    Richard

    1. Ah – the .\ at the beginning says find the following file in the current directory and execute it. If the wsl2host.exe isn’t in the same directory as your elevated command prompt opens up in then you’ll need to Change Directory (CD) to the right place.

      cd c:\Users\Richard\Downloads

      (you may not be called Richard on your computer though, you’ll have to look in File Explorer to find out where your Downloads directory actually is and use that instead).
      In my case for example it’s cd c:\users\snibb\Downloads

      Once you’re there you can issue the .\wsl2host.exe install command

      Hope that helps
      Steve

  3. Ah – thought it was a syntax error or similar. OK – the command now runs fine but the problem is I only know my Microsoft account PW and that does not work here. I have no idea if I have a PW for a local account – so will have to chase that issue down.

    Thanks anyway for you kind and prompt help. Leave it with me. If I fail even more miserably I’ll be back as Arnie said.

    Richard

  4. OK – the problem was one with the Microsoft account name and PW. I use Linux 95% of the time and only log in to Windows if I really need to. At the moment I dual boot for this. So it is ages since I had to do anything with Windows that required remembering passwords etc.

    Anyway, I finally got everything working – Services, Local Security, PWs, and host file. What a business! Not sure most average Win 10 users would be able to manage this lot just to see a Linux distro complete with desktop environment working via wsl. I look forward to the day (apparently just a couple of months from now) when setting up the DE part of things is automated.

    Cheers

    Richard

    1. I tend to agree, it is a right chow on and it’s not something the average Windows user will do. To be fair though, it’s more aimed at a reasonably seasoned Linux user and they’re probably the ones most likely to want to get it working.

      Glad you made it happen – it’s pretty good once it’s set up! The MS Wayland server to do it all natively will be very very interesting indeed though

      All the best,
      Steve

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.