-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
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
access Linux symlinks from \\wsl$ #5118
Comments
Yeah. Another thing I've observed is the names don't show in powershell: One work-around which I happened to have handy from another post is to use Samba:
No that's actually not well formed. Windows has never heard of a
You're almost certainly on the wrong side of the fence. Gather whatever it is you are gathering on the WSL side with interop. If what you're gathering is more complex than that, do the more complex thing on the WSL side too. |
OP's use case may be overkill, but it would definitely be nice to be able to access Linux symlinks from Windows. Right now, even a directory symlink shows up as a regular file. |
There are a lot of symlinks in my project on WSL2, and they can't be opend in windows 10(2004) file explorer and also any GUI editors. Hopefully this issue can be resolved. |
From Windows 10 version 1903, WSL allow Windows apps change Linux files via path prefixed One common use case is using a Windows application to edit a Linux configuration file, since symlink config files are quite common in Linux, e.g. Some expectations for Linux symlink in WSL:
It will take some effort on Windows Explorer and WSL's 9P server. |
Any news about this problem? Any chance that windows explorer and other apps (IDEs for example) will support WSL symlinks? |
In WSL 1, it was recommended to keep files shared between Windows & Linux in Windows, and in Linux access them through a mount ( |
Any news on that? This feature would make it possible to run a dev environment (which usually always has some symlinks somewhere) in WSL2 while running the IDE in Windows. That would really supercharge the power of WSL2 |
Agree with @proligde |
Having this would be ideal for PHP development. I'm always having trouble mapping a local WordPress app to a plugin/theme developed on the WSL2 side. Creating the Symlink it's possible and works great on the explorer. But that symlink is not accessible afterward via PHP.
|
+1 |
+1 I've faced this problem too |
+100500 |
+1 this would be extremely helpful. |
My use caseWSL2 side:
Windows side:
ConclusionWithout auto-completion the developer's experience is broken. This compares to a prior setup in which instead of sharing via I think the fix for this issue should be located in the source of the |
It is probably a problem located in the P9 file server. Should we open the bug in a repo specific to the P9 file sharing thing? Or the P9 team is looking at this repo as the main source to guide their development? I'd be more than happy to contribute (if my knowdlege permits it haha) to code/solve this bug if someone helps me to bootstrap the dev environment and directs me to the place where to look at. |
Need this pretty please. My use case is quite simple, i work on an Angular project which uses a node_module that we update frequently, so we have a link between the dist output and the node_modules of the project, but it messes with the IDE that can't see the files. |
I am using WSL2 and Lando and everything is working ok in WSL for it except the symlinks. When I want to connect the symlink in WordPress to the theme or plugin folder WordPress doesn't see them. If I hit this in terminal ls -ls i get the connection shown but it doesn't work. I believe this is an urgent matter, any idea when it will be resolved? |
@DamirPecnik You see the link "in" the linux side but "not in" the windows side? |
Symlinks created in Windows can't be seen in Linux by PHP, for example, the theme in the theme folder in WordPress is not there. |
Ran into this issue with a NixOs build of a Haskell project. The output is compiled into a bin folder that is sym linked to the /nix directory which changes hashes every build. Can't use a windows command to open a file in the sym linked folder. Maybe unrelated, but why aren't sym links converted windows shortcuts in the file explorer? |
https://youtrack.jetbrains.com/issue/CPP-25670 I opened an issue because clion couldn't see past the \wsl$ path to png.h. Though everything compiles there is alot of red underlines in the ide because of this. |
Indeed, I missed that and this is a pretty good news ! |
2023.1 already has Remote Development feature that allows you to connect to WSL and run it in a proper context. The feature is in Beta now and is quite unstable but let's hope it will get better through time |
I know but it currently behaves as a separate IDE and it has some issues with plugins and themes and some features are missing from the local IDE (such as some fix suggestions). |
Yes, that's what I meant by "unstable" 🙂 |
So I still see no milestone, no assignee and mainly - no PR - what is the current state of this? |
@benhillis Are there any plans to implement symbolic links through the wsl$ paths, please? Projects already started skipping creating symbolic links in WSL2 because of missing support when accessing the files from Windows. JetBrains IDEs also suffer from issues with symbolic links when using WSL2. |
Hi guys! is there any news on this issue? many people have been waiting for a solution to this problem for many years. |
The moment when the company does not care about their users. They can't even officially refuse this functionality. |
Hi @craigloewen-msft, I can see you're quite active in this repo. Is there any chance you could find the right person on the Microsoft team to reply to this thread? 🙏 |
This works pretty well as a tactical solution. I've setup a
This script works without explicit credentials if your Windows username/password matches your The other option would be |
Есть новости по этой задаче? |
It seems that Microsoft has given up on fixing this |
guys, hi! 😃 It will be great if this problem is solved! The community has been waiting for a solution to this problem for many years. |
turborepo with pnpm, yarn workspaces not working on wsl2 ubuntu image |
+1 |
1 similar comment
+1 |
@benhillis any chance this can get looked at? |
4 years later and still waiting |
+1 |
There is a Subscribe button if you want to follow. Sending +1 to more than 200 people seems rude. Thanks. |
It's not about follow, it's about saying "I too support this issue" for an issue that is not solved for 4 years. It's about bringing attention and keeping the thread alive... The issue is more and more pressing since symlinks are getting in volume. |
I really hate to contribute to the email spam here, but giving a thumbs-up will push the issue closer to the top of the most popular feature request issues: https://github.com/microsoft/WSL/issues?q=is%3Aissue+is%3Aopen+label%3Afeature+sort%3Areactions-%2B1-desc If you look there, you'll see this feature is currently the 8th-most requested feature for WSL. Sorting feature requests by most recently active is not exactly a good metric (at least in my opinion), partially for the reason mentioned above, but also because discussion != support. If you want to comment every couple months just to make sure it doesn't get regarded as fixed through some other means, fine... There is no need to consistently keep this issue on the front page of most-recently-updated feature requests. This is how issues get locked. I have no authority in this regard, but I question whether this may violate the repository's Code of Conduct "disruptive behavior". |
This issue was brought to my attention on Twitter. I have no inside information on this, but I do have a theory as to why this issue persists/feature request is still outstanding. Windows to WSL file sharing via the UNC path, e.g. This is not unlike the virtio implementation of 9p for QEMU and KVM. 9p is a very simple, fast, lightweight protocol for file sharing, which is descended from the Plan 9 operating system. It makes sense from a speed perspective to use over NFS or Samba and was much simpler to implement. 9p also avoids the GPL licensing issues that NFS and Samba would introduce. The issue here, I suspect, is that the Plan 9 OS, and thus 9p, never adopted symbolic links from its predecessor, UNIX, which Linux was heavily influenced by, via MINIX. Rob Pike, who worked on UNIX at Bell Labs, alongside Ken Thompson, with help from Dennis Ritchie, later worked on Plan 9 as a successor to UNIX which shed many of its complexities. Pike specifically rejected symbolic linking in Plan 9. You also know Pike as the inventor of Go. A search of GitHub issues shows several other projects that implement 9p also lack symbolic link support, such as minikube. WSL implements the 9p2000.l dialect of 9p, which is a lightweight subset of 9p2000 which specializes in data types relevant to Linux system calls, maps directly to the Linux file system, and provides speed enhancements for Windows to WSL file operations. The alternative would be to implement the 9p2000.u dialect of 9p which does implement symbolic links, but would not include the Linux-specific enhancements and be more challenging to implement. This appears to be a tradeoff made between simplicity/speed and full support for things like symbolic links. This is just my theory, but I wanted to provide some potential context to the discussion. |
It appears WebStorm just added support for symlink (https://www.jetbrains.com/webstorm/whatsnew/2024-3/) Haven't tried the feature yet, but the problem seems finally over for those of us who use this IDE. |
I tested this new feature in jetbrains products. I can confirm that everything works well. I use the pnpm package manager, which uses hard symlinks to store packages in a single repository. Everything works great, no problems so far. Thank you very much to the jetbrains engineers! |
Is your feature request related to a problem? Please describe.
I want to be able to open a symlink from the '\wsl$\Ubuntu' directory. The reason for this Is I'm writing a program that would read an elf binary and import the required objects to run it inside the directory that the binary is in.
This is from a virtualization perspective the kernel we use is linux based and Im purely looking at a way to improve development of apps on Windows. The only thing I want to do with the files is be able to read them and copy to a location without any changes. But most elf objects link to shared libraries that are symlinks but Windows doesn't seem to know what to do with that file. Any sort of open on that file results in system could not find the name specified. I assume this is because the explorer is attempting to open the symlink but its at a path it doesn't understand like '/lib/64' instead of '\wsl$\Ubuntu\lib\64'.
Describe the solution you'd like
Maybe on the file open in the windows explorer prefix it with the location of the symlink. '/lib/64' turns into opening '\wsl$\Ubuntu\lib\64' I imagine this would be a big task probably.
Describe alternatives you've considered
I could probably resolve this from the perspective of installing another daemon on my subsystem and just do the calls there. I'm mainly querying about this so I can improve UX of our application and the user doesn't have to install two of the same thing.
Is there a use case where we could set the LD_LIBRARY_PATH on our Windows machine to point to one of the sub system shares?
Additional context
Basically want to read the ldd of an elf binary copy the objects into a windows directory. Proceed to do that recursively for everything that binary requires.
The text was updated successfully, but these errors were encountered: