microsoft / microsoft/WSL

access Linux symlinks from \\wsl$

Open
#5,118 134 comments 369 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature file system
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files, tests, or entry points. Start by reviewing how WSL exposes Linux symlinks through the \wsl$ share and how Windows file-open requests resolve symlink targets. Done means defining and implementing a supported way to read and copy ELF dependencies whose paths are Linux symlinks, with behavior that works recursively for the stated use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.