I downloaded Linux Bash Shell on Windows 10, but I met with two problems. To start with, I tried moving all my previous codes to the home directory, but I couldn't see any of those files in the bash terminal. It only works when I copy and paste those files in the bash shell. How am I supposed to do this? I don't want to save my scripts somewhere else and manually copy them into my home directory every time.

Anyway, I decided that I will keep those scripts where they were, and create a shortcut to their location from my home directory. Let's say the directory where I put all my files is called XXX, and there are three folders in that directory, YYY, ZZZ ,and AAA. I opened the bash terminal and created a shortcut using ln -s /mnt/c/Users/.../XXX. As expected, XXX appeared in my home directory. I opened the shortcut with cd XXX, and it did take me to XXX, but when I tried to access YYY from there, I couldn't.

When I type cd YYY, I'm taken to the ~/XXX/YYY/, but when I used ls to check my files in YYY, I found that the content of YYY was exactly the same is XXX, meaning I see YYY and ZZZ in the YYY directory. I tried again, with cd YYY, which took me to ~/XXX/YYY/YYY/, and so on. I could never get into the YYY folder. The same situation comes up for ZZZ too Thanks to anyone who can solve either one of my two problems


My guess is that it's just buggy.

Although I'm not stating this as an absolutely proven answer that is guaranteed correct, the basis for my answer is more than just some wild stab in the dark. When I installed Microsoft's release of bash for Windows, the software pointed to https://aka.ms/wsldocs for documentation. When I went there, I read:

This is provided as beta software. While many of the coreutil commands provided by Ubuntu will work, there are some that will not.

The "coreutils" package includes some rather simple commands, such as: * pwd (GNU coreutils manual: pwd) which simply outputs the "present working directory", the equivalent of running "cd" (without a parameter) in DOS or Windows CMD * cat (GNU coreutils manual: cat), which simply outputs streams (like files), the equivalent of running "type" in DOS or Windows CMD * head (GNU coreutils manual: head, which outputs the first 10 lines (or some other specified number of lines)

and, another one (which may be most relevant to this question): * ln (GNU coreutils manual: ln, which creates symlinks

All of these programs are generally considered rather simple, but many are considered to be quite essential for doing some basic tasks, hence why they are part of this package called "core" utilities. Since Microsoft has declared that these aren't fully functional, it means that this bash release just really isn't ready for prime time yet. So when they say the software is "beta", they really do mean it.

It looks to me like subdirectories of symlinks aren't being fully supported yet. Unless you intend to fix Microsoft's still-broken code, I suggest waiting. Or perhaps trying some alternatives. I'm not necessarily saying that any of these will do exactly what you want either, but I think all of these have been around longer than Microsoft's Linux->Windows translation "subsystem" code. So, if playing with Microsoft's newly released code is causing frustration, these might be a bit more reliable, and so these might be more fun to play with.

  • Cygwin
  • NTFS filesystem: specifically the feature called Junctions
  • Winsh (My own releases of some software)
  • MSYS coreutils
    • (My winsh page provides some info about the DLL files to make that work easily)
    • I've seen a 90,624 byte "ln.exe", which I believe came from that. Haven't played with it, though. Maybe this will even work better with Microsoft's bash release? Or maybe not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.