What's in here?
List files with ls
⏱ Est. ~4 min
01 · Read
Knowing where you are is useful, but you also need to see what's around you. The ls command lists all the files and folders in your current location.
💡 Picture thisThink of ls as flipping the light switch on in a room — suddenly you can see what's inside.
Key points
- ls is short for list
- It lists files and folders in the current directory
- Folders and files look different in the output
02 · Terminal exercise
Now that you know where you are, let's see what's around.
(This section is interactive — please enable JavaScript.)
03 · Terminal exercise
Want more detail? Try the "long format".
(This section is interactive — please enable JavaScript.)
04 · Terminal exercise
Some files are hidden (names that start with a period). Let's reveal them.
(This section is interactive — please enable JavaScript.)
05 · Quiz
Which ls flag shows hidden files (the ones starting with a period)?
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.