Bash on Ubuntu on Windows: ls command returns nothing at root level

29,526

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.

Share:
29,526

Related videos on Youtube

Sergei Wallace
Author by

Sergei Wallace

Software developer at Accenture Technology with data science (Python) and big data engineering/analytics (Scala, Apache Spark) experience.

Updated on September 18, 2022

Comments

  • Sergei Wallace
    Sergei Wallace over 1 year

    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.

  • Sergei Wallace
    Sergei Wallace about 8 years
    You're right. There are just hidden folders. How do I access all of my Windows folders from Bash on Ubuntu on Windows, then?
  • jadkins4
    jadkins4 about 8 years
    Your C drive is at /mnt/c/
  • jinglesthula
    jinglesthula over 7 years
    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.
  • jadkins4
    jadkins4 over 7 years
    It 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
  • Prometheus
    Prometheus about 5 years
    if you want to list all directories in root. simply type ls /