Menu
Coddy logo textTech

List Files

Part of the Fundamentals section of Coddy's Terminal journey — lesson 5 of 82.

The ls command stands for list. It shows you all the files and folders inside your current directory.Simply type ls and press Enter:
ls
The output will show everything in your current location:
documents
readme.txt
Useful options you can add to ls:ls -l — shows a detailed list with file sizes, permissions, and dates:
ls -l
ls -a — shows all files, including hidden files that start with a .:
ls -a
ls -la — combines both options, showing a detailed list of all files including hidden ones:
ls -la
You can also list the contents of a specific folder by passing its name:
ls documents
This shows the contents of the documents folder without having to navigate into it first.
challenge icon

Challenge

Beginner

Use the ls command to list the visible files and folders in your current directory.

Hint: ls takes no arguments when listing the current directory — just type it and press Enter! Hidden files (the ones starting with .) stay out of the way until you ask for them with ls -a.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals