We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issues #4177
Windows Subsystem for Linux
首先找到安装位置,最简单的方法是,打开应用商店,找到应用Windows Subsystem for Linux,点击应用详细介绍页面的打开按钮,会新打开一个 terminal 窗口,窗口的标题上面有所安装的wsl.exe的全路径。
打开
wsl.exe
或者也可以手动搜索,由于目录C:\Program Files\WindowsApps是保护文件夹,没法直接在资源管理器中搜索,可以管理员打开powershell cd "C:\Program Files\WindowsApps" ls 找到对应版本的 wsl 目录,例如MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe
或者也可以手动搜索,由于目录C:\Program Files\WindowsApps是保护文件夹,没法直接在资源管理器中搜索,可以管理员打开powershell
C:\Program Files\WindowsApps
powershell
cd "C:\Program Files\WindowsApps" ls
找到对应版本的 wsl 目录,例如MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe
下载nolsp.exe
管理员打开powershell,执行以下命令:
# 打开nolsp.exe所在目录 cd E:\Downloads\Other\nolsp.exe # 该步骤就相当于添加注册表 .\nolsp.exe "C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe\wsl.exe" .\nolsp.exe "C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe\wslservice.exe" # 注意:这里的wsl.exe以及wslservice.exe,必须是全路径,不能是相对路径。
打开注册表regedit,找到\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog,依次点击此目录的各项,可以找到两项:
regedit
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\2BB0D7FB] "AppFullPath"="C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe\wsl.exe" "PermittedLspCategories"=dword:80000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\2FB92E99] "AppFullPath"="C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.2.0_x64__8wekyb3d8bbwe\wslservice.exe" "PermittedLspCategories"=dword:80000000
至此,就可以打开 wsl 了。 如果商店更新了Windows Subsystem for Linux,需要重新执行一遍此流程
直接在注册表regedit添加项即可:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3] "AppFullPath"="C:\Windows\System32\wsl.exe" "PermittedLspCategories"=dword:80000000
管理员打开 powershell,运行netsh winsock reset,不用重启,就可以打开 wsl 了。 但是每次重新启动电脑时,都要重新运行一次此流程。
netsh winsock reset
The text was updated successfully, but these errors were encountered:
No branches or pull requests
issues #4177
如果应用商店安装了
Windows Subsystem for Linux
首先找到安装位置,最简单的方法是,打开应用商店,找到应用
Windows Subsystem for Linux
,点击应用详细介绍页面的打开
按钮,会新打开一个 terminal 窗口,窗口的标题上面有所安装的wsl.exe
的全路径。下载nolsp.exe
管理员打开
powershell
,执行以下命令:打开注册表
regedit
,找到\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog
,依次点击此目录的各项,可以找到两项:至此,就可以打开 wsl 了。
如果商店更新了
Windows Subsystem for Linux
,需要重新执行一遍此流程如果应用商店没有安装
Windows Subsystem for Linux
直接在注册表
regedit
添加项即可:临时解决办法:
管理员打开 powershell,运行
netsh winsock reset
,不用重启,就可以打开 wsl 了。但是每次重新启动电脑时,都要重新运行一次此流程。
The text was updated successfully, but these errors were encountered: