On the new Bash on Ubuntu on Windows app on Windows 10, I tried to run ls
from the starting directory to see the subdirectories but nothing comes up. I don't really know the directory structure so I'm not sure how to proceed next. What am I doing wrong here? I'm sure this is totally noob of me but I'm not sure what else to do.
-
1ls / will list all root directories– PrometheusApr 7, 2019 at 14:06
2 Answers
it probably just means the folder is empty (or only contain hidden files).
you can try ls -a
(or ll
) to see hidden files (including .
and ..
) and see that it works.
you can also try to create files and folders then rerun the command to see your created files and folders.
-
You're right. There are just hidden folders. How do I access all of my Windows folders from Bash on Ubuntu on Windows, then? Apr 16, 2016 at 17:22
-
7
-
2
cd ~
usually takes me to my user directory. In bash on windows this takes me to a directory empty except for things like.bashrc
. It seems like there are some gotchas or caveats with mapping things. Aug 24, 2016 at 18:39 -
1It still takes you to your "home directory" on Windows' Bash, it's just that your home dir starts empty and it's disconnected from your Windows drive. Consider that it's like having a Linux machine with the Windows drive mounted as a secondary or network drive. But if you install Ubuntu stuff that go the "home dir" that will be where
cd ~
takes you– EranAug 25, 2016 at 3:48 -
1
When you see your Linux command prompt, type:
cd /mnt/c/Users/username
Where c
means C: drive and username
is your Windows username.
Then, when you type ls
, you will see folders like Desktop
, Documents
, Downloads
, etc.