Linux command 02
ls
Show the files and folders inside your current location.
Syntax
Command
ls
Example
Example command
ls
Run ls after checking your location with pwd to see the files and folders available in that directory.
Why it matters
You cannot work confidently in the terminal if you do not know what is in the current directory. ls gives you immediate visibility before you act.
Expected output
You should see one or more file or folder names.
What you may see
Documents notes.txt scripts
The exact names will depend on your machine. Linux is showing the contents of the current directory.
Common mistake
Mistake: Typing ls and expecting detailed explanations for each item.
Correction: Basic ls only lists names. It does not describe what each file does. Start by identifying the names you see.
Practice
- Run pwd, then ls, and explain how the two commands relate.
- Move to another directory and use ls again.
- Identify which entries look like folders and which look like files.
Video
Quick walkthrough
This section is reserved for a short visual demo. For now, use the practice prompts to reinforce the command.
Previous / Next
Continue to next command
Stay with this command until it feels familiar, then move forward calmly.