'ls' Command Not Working On Windows


#1

Question

Why doesn’t the ‘ls’ command work when I try it on my computer or in the Codecademy terminal?

Answer

If your computer is running Windows, you’ll need to make sure you’re trying this command inside PowerShell. Otherwise, the command for Windows to do the same thing is dir.

If you’re trying the command in Codecademy’s environment and find it isn’t working as expected, make sure you’re typing it exactly as asked: ls. Note that Ls will not work – commands are case-sensitive! Any other variation will not work.