ls: What Is Here?
Listing a folder.
Now that you know where you are, the next question is, what's here? The LS command answers that. It's short for list, and you'll use it more than almost any other command.

- What's in this folder?
- ls lists it
- You'll use it constantly
Listing your home folder
Type LS, and press Enter. Sam's home folder holds four folders, Documents, Downloads, Music, and Pictures, and two text files, notes, and to do. LS lists them in alphabetical order, with capital letters first.
ls Documents Downloads Music Pictures notes.txt todo.txt
Listing another folder
You can also give LS a folder to look into, without going there. LS Documents shows the two files inside Documents. And LS Pictures shows two photos. Notice the prompt never changed. We're still at home.
ls Documents cv.txt report.txt ls Pictures beach.jpg party.jpg
Folder or file?
In this plain list, it's hard to tell folders from files. Dash capital F fixes that. It adds a slash after every folder. Now we can see at a glance, that Documents is a folder, and notes dot TXT is a file.
ls -F Documents/ Downloads/ Music/ Pictures/ notes.txt todo.txt
Summary
LS lists the current folder, LS followed by a name lists another folder, and dash capital F marks folders with a slash. Next, moving around the tree.
Key takeaways- ls
- ls <folder>
- ls -F marks folders