Linux – Sane symlinks to parallelize Windows and Ubuntu homes on WSL


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?

Best Answer

  • 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.

  • Related Question