1. 先找WSL2安装路径

我是在microsoft store安装,路径在C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2020.812.0_x64__79rhkp1fndgsc\ubuntu2004.exe

2. win+r 输入regedit打开注册表

计算机\HKEY_CLASSES_ROOT\Directory\Background\shell\

然后新建一个项 bash  here

3. 右键bash here 新建两个字符串值 一个默认名字 一个命名为Icon

在Icon中填入值为WSL2的执行路径(1.中有写 需要自己找一下)

WSL2 Ubuntu20.04添加右键启动4. 在bash here中新建一个项command,在其下新建一个字符串值并在其中填入 执行路径 并在后面加入 -c bash

WSL2 Ubuntu20.04添加右键启动

相关文章:

  • 2021-11-06
  • 2022-02-02
  • 2021-08-02
  • 2021-05-16
  • 2021-08-10
  • 2021-10-11
  • 2021-12-26
  • 2021-12-06
猜你喜欢
  • 2021-04-09
  • 2022-12-23
  • 2021-12-22
  • 2021-10-07
  • 2021-08-03
  • 2021-07-14
  • 2021-10-20
相关资源
相似解决方案