6

I'd like to link up, insomuch as is possible, my Windows home folder with my WSL Ubuntu Linux home folder. Up to now I've pretty much just gone into Ubuntu bash on WSL and just created a symlink to each Windows home folder like so: $ ln -s /mnt/c/Users/username/Documents/ $ ln -s /mnt/c/Users/username/Desktop/ ...

Is there a preferred method here or is this the "right" approach?

3
  • Is the method you're using working? Are you just soliciting opinions regarding possible other ways? Or is something about your current method not working? Mar 1, 2019 at 16:00
  • 1
    @music2myear this SEEMS to be working, but I'm just concerned that it might in some way be brittle with some kind of update or plans from MS, etc. that I'm not aware of. It would be nice if there was a documented path that MS + Canonical suggest for this and I was hoping to find it vs just doing what I think's best based.
    – ylluminate
    Mar 1, 2019 at 20:56
  • Got it. Doing what you're doing is a bit of a niche case, and there is no officially correct way to do it because it is niche. If there were an officially correct way, this would likely be documented by Microsoft. They tend to be pretty good at documenting things like this and making that available online on their support pages. Using the built-in tools such as symlinks is going to be as close to the correct way as possible. The only likely issues I can foresee would be permissions-based issues.l Mar 1, 2019 at 21:35

1 Answer 1

3

This question is quite old, but maybe my answer can help someone else.

Symbolic link work with two parameters, you must pick the directories that will be connected (symbolically) this for ubuntu or Debian dists.

ln -s /directory/to/link /directory/where/will/link

Windows Linux subsystem works in the same way, for an Ubuntu subsystem windows file system is mounted inside /mnt/ so if you do something like this:

ln -s /mnt/c/Users/Luis/Documents/server /var/www/html/

Then you will have a directory called server, inside of /var/www/html/ and any file or folder created in Users/Luis/Documents/server will be reflected inside the subsystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .