June 12, 2026 · by Meegrow Labs

What Is the ls Command? List Files in Your Terminal

You opened a terminal, typed a command to find out where you are, and the screen just sat there with a blank line. So now what? You know your location, but you have no idea what is actually inside this folder. Is it empty, or packed with files you forgot about?

This is where the ls command comes in. In the very first 100 words of this lesson, here is the short version: the ls command lists everything in your current folder so you can see it without clicking around.

The ls command lists every file and folder inside the place you are currently standing in the terminal. Type ls, press enter, and the terminal instantly prints the contents that were hidden a second ago.

What does the ls command actually do?

Think of a folder like a closed drawer. You cannot see what is inside until you slide it open. The ls command is that slide. One moment the drawer is shut and the terminal shows a blank line; the next moment everything is visible.

The name is just two tiny letters: l and s. It is short for list. That is the whole idea. Every folder holds things, files and other folders, and ls simply lists them out for you.

How do I read what ls shows me?

Let’s read a real example. After you run ls, you might see something like this:

notes.pdf  College/  song.mp3

Here is how to read each one:

  • notes.pdf is a file.
  • College is a folder. A slash often appears after a folder name to tell you it is a folder, not a file.
  • song.mp3 is a file.

So in one clean list, you see files and folders together, all in a single glance. No guessing, no clicking, no opening apps.

How do I try the ls command right now?

You only need three steps, and you can do them this minute:

  • Open a terminal on your computer.
  • Type ls (that is a lowercase L followed by a lowercase S).
  • Press enter and read the list that appears.

If you see a name with a slash after it, that is a folder. Everything else is a file. That is it, you just looked around your folder without touching a mouse.

Why does the ls command matter for beginners?

When you are learning the terminal, the scariest part is the feeling of being blind, typing into a black screen and hoping nothing breaks. The ls command removes that fear. You stop guessing blindly and start seeing exactly what is around you.

This pairs perfectly with the previous step, where you learned to ask the terminal where you are. First you check your location, then you check what’s here. Together they give you a clear map of your folder before you do anything else.

These small commands are the foundation for everything later, including tools like Claude Code and AI agents. You can build all of it step by step in the free Zero to AI Hero course.

Key takeaways

  • The ls command lists every file and folder in your current terminal location.
  • ls is short for list, just two letters: l and s.
  • A slash after a name means it is a folder; everything else is a file.
  • To try it: open a terminal, type ls, press enter, and read the list.
  • Next up is moving into one of those folders with the cd command.

Once you can see what’s here, the natural next step is moving into a folder. Keep your streak going and continue with the next lessons in the free Zero to AI Hero course.


🚀 Take the full free course: Zero to AI Hero — learn to build with AI from scratch. New lessons daily, in Hindi & English.

Meegrow Labs

We help India go from zero to AI hero — learn to use & build with AI from scratch, in Hindi & English. Start the free course →

Want to actually learn this?

151 free 2-minute lessons — from "what's a file?" to building with AI.

▶ Start the free course