Code Monkey home page Code Monkey logo

Comments (6)

Lips7 avatar Lips7 commented on July 19, 2024

image
image

from dowww.

spencerwooo avatar spencerwooo commented on July 19, 2024

你可以直接在 VS Code 里面指定开启的 Shell 为 /usr/bin/zsh,应该就可以统一 PowerShell wsl 命令和 VS Code 打开的 Shell 了。这样应该是比较方便的。

from dowww.

Lips7 avatar Lips7 commented on July 19, 2024

设定过后也一样
执行pstree后得到结果如下
image
分别执行echo $PATH 得到的环境变量也不同
在powershell里执行wsl后得到的环境变量包含windows的环境变量,但不包含用户环境变量,如/home/lips/.local/bin
remote-wsl里得到的环境变量正好相反,不包含windows,但包含用户环境变量

环境变量应该给某个脚本修改过,不是wslServer.sh,但也没找到。

基于以上的事实,wsl与windows的互操作性(官方文档有),完全被remote-wsl破坏了。

btw更新到wsl 2后只能通过\\wsl$\Ubuntu\才能从windows访问wsl的文件系统(可以在wsl里执行wslpath -w '/'得到)

from dowww.

spencerwooo avatar spencerwooo commented on July 19, 2024

我手头没有 Windows 电脑...没法复现这个问题。我也不太知道这个怎么解决...

from dowww.

Lips7 avatar Lips7 commented on July 19, 2024

我手头没有 Windows 电脑...没法复现这个问题。我也不太知道这个怎么解决...

microsoft/WSL#4374
官方大佬回复了,说会尽快解决。

from dowww.

spencerwooo avatar spencerwooo commented on July 19, 2024

Amazing,解决了就好,等官方 PR 了~

from dowww.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.