Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Getting Started with the Console Running Commands

Ranvir Sahota
Ranvir Sahota
9,844 Points

ls and ls -l return nothing (to be clear ls -l return 'total 0')

I'm using bash on Windows 10 that can be installed on the anniversary version. Can someone please explain why they don't return anything and if something is potentially wrong with my installation.

2 Answers

If you remember from the intro video, Windows is not based on the POSIX Framework (Unix, BSD, Linux, Solaris, etc); this means that there will be many differences between interacting with BASH and interacting with LINUX.

There are similarities, however.

The equivalent command for UBUNTU'S 'ls' command in Windows BASH is the command 'dir' and it works in more or less the same way. Give it a try.

If you choose to use Windows BASH throughout this track, a quick google search for "Windows and UNIX command line equivalents" will provide you with the equivalent Windows prompts for the Unix commands we are learning.

Cheers!

Your home directory (assuming this is where ls -l was run) could simply be empty. Try running ls -la as a test. The -a option will display all files, hidden docs as well as the current and parent directories ("." and ".." respectively).