Looking Around: Listing What's There
Here is the plain idea: now that you know which folder you're standing in, the next thing you'll want is to see what's inside it — the files and folders living there. There's one short command that lists them all out for you. Looking around is something you'll do constantly, before nearly every other move.
Remember, the terminal shows nothing on its own. Unlike a file window full of icons, it stays blank until you ask. So "what's in here?" is a question you have to speak — and the answer comes back instantly.
Turning on the light
Imagine walking into a dark pantry. You know you're in the pantry, but you can't see what's on the shelves until you flip the light switch. Then everything's revealed at once — the flour, the cans, the jar of honey at the back.
Listing a folder is that light switch. The folder's contents were always there; you just hadn't lit them up yet. Flip the switch and the shelves appear. 🔦
The list command
The command is ls, short for "list." Type ls, press Enter, and the computer prints the names of everything in your current folder:
Documents Downloads notes.txt photo.jpg
Each name is one thing living in this folder. Some are folders themselves (like Documents), and some are files (like notes.txt). At a glance they can look alike, which we'll sort out in a moment.
If the folder is empty, ls prints nothing at all and just gives you a fresh prompt. That blank isn't an error — it's the honest answer "there's nothing here yet."
Asking for more detail
A bare ls gives you names and not much else. Often you want a little more — like how big each file is, or when it last changed. You ask for that by adding a small note to the command:
ls -l
That -l (the letter L, for "long") is called a flag — a little add-on that tweaks how a command behaves, like asking the same waiter for your coffee "to go." With -l, each item gets its own line with extra details beside it: who owns it, its size, the date it last changed, and — at the very start of the line — a symbol that says whether it's a file or a folder.
Another handy flag shows hidden items:
ls -a
The -a means "all," including the quiet files whose names start with a dot (like .config). Computers tuck those out of sight by default because they're usually settings you don't need to fuss with — they're not secret, just hidden to cut clutter. You can even combine flags: ls -la gives you the full detailed list and the hidden items together.
Files versus folders
When you list a folder, you'll see two kinds of things mixed together, and telling them apart matters before you act on anything.
A file is a single thing that holds content — a document, a photo, a song. Picture a piece of paper. A folder (also called a directory) is a container that holds other files and folders inside it, the way a drawer holds objects.
With plain ls they can look identical. Two things help you be sure. First, colour: many terminals paint folders one shade (often blue) and plain files another, so they stand out once you know to look. Second, and more reliable, is ls -l: every folder's line begins with the letter d (for directory), while a plain file's line begins with a dash (-). So a line starting d is a drawer; a line starting - is a piece of paper. Knowing which is which keeps you from trying to "open" a photo as if it were a drawer.
Your turn
In your terminal, type ls and press Enter. Look at what's there.
Now type ls -l and compare — see how each thing gets its own line with extra details? Find one folder (look for the leading d) and one plain file (look for the leading -). Then try ls -a: did any new dot-names appear that weren't there before? Those were hidden all along.
You've just learned to look before you leap — and looking first will save you more confusion than any other habit in this course.
Next up: actually moving — stepping from one folder into another. 🐙
Stuck or curious?
Ask Pip about this lesson — tap the porthole bottom-right.