WSL icon indicating copy to clipboard operation
WSL copied to clipboard

how to start wsl2 Distro

Open yangyuw opened this issue 7 years ago • 13 comments

Please fill out the below information:

  • Your Windows build number: Microsoft Windows [Version 10.0.18917.1000]

  • What you're doing and what's happening: wsl2 stopped when I reboot and I don't know how to start again. --help don't helped me . wsl closed immediately after I open it. wsl -l -v show blow:

C:\Users\52945>wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Stopped         2

yangyuw avatar Jun 17 '19 00:06 yangyuw

bash

andreluizgit avatar Jun 17 '19 00:06 andreluizgit

I guess you've encountered this issue(#4105).

02w avatar Jun 17 '19 08:06 02w

We’ve labelled your issue as ‘need-repro’ since we need more steps to help identify your problem. Could you please provide us with reproducible steps for the issue you’re experiencing, including things such as the specific command line steps necessary to reproduce the behavior and their output. Thank you! -The WSL Team

ghost avatar Jun 17 '19 18:06 ghost

@yu-yang2 could you send the command lines and error outputs that you're seeing when trying to start WSL? What do you see when you run wsl.exe ?

craigloewen-msft avatar Jun 17 '19 18:06 craigloewen-msft

@mscraigloewen When I open wsl.exe, the command box pops up for a second and then closesd immediately, no error logs.

yangyuw avatar Jun 18 '19 02:06 yangyuw

wsl.exe need command line parameters for example, i just ran wsl.exe -d Debian to run the debian distro

start a powershell cmd shell, and play with the wsl command there (wsl itself doesn't have a UI)

(I'm guessing when you say "open", you mean you double click on it in explorer?)

SvenDowideit avatar Jun 18 '19 06:06 SvenDowideit

@SvenDowideit when I run wsl.exe -d Ubuntu-18.04, it shows error blow.

PS C:\WINDOWS\system32> wsl.exe -l -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Stopped         2
PS C:\WINDOWS\system32> wsl.exe -d Ubuntu-18.04
The referenced object type does not support the attempted operation
PS C:\WINDOWS\system32> wsl
The referenced object type does not support the attempted operation
PS C:\WINDOWS\system32> wsl.exe
The referenced object type does not support the attempted operation

yangyuw avatar Jun 18 '19 09:06 yangyuw

@yu-yang2 - that is a new error, could you please collect a trace?

benhillis avatar Jun 18 '19 13:06 benhillis

@benhillis cloud you please tell me how to collect wls.exe trace?

yangyuw avatar Jun 19 '19 02:06 yangyuw

Instructions are in our contribution instructions under "collect detailed logs".

benhillis avatar Jun 19 '19 02:06 benhillis

image same problem after convert wsl1 to 2.

tyskink avatar Sep 06 '19 14:09 tyskink

I just upgraded 18990.1 in order to use wsl2, and it stopped.

PS C:\WINDOWS\system32> wsl
远程主机强迫关闭了一个现有的连接。
PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
* Alpine    Stopped         2
PS C:\WINDOWS\system32>

redblue9771 avatar Sep 26 '19 13:09 redblue9771

#4105 According to this issue, I cleared the hosts file and used solved it.

redblue9771 avatar Sep 26 '19 13:09 redblue9771