What does it mean to 'list all files and directories'?


#1

Question

This exercise asks us to ‘list all files and directories in the working directory.’ What does that mean?

Answer

So far, we’ve learned how to use two key commands: ls and pwd. If we use ls, it’ll show all files and directories in the directory you’re currently in – also known as the ‘working directory.’

By default, the ls command will display all directories (folders), files, programs, etc. Specifically, all the directories and files that aren’t hidden. To include hidden stuff, we can do ls -a, and anything you see prefaced with a period is a hidden file, like .bashrc.