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 <strong>ls</strong>:

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 all files and folders in your current directory.

Hint: ls takes no arguments when listing the current directory — just type it and press Enter!

Cheat sheet

The ls command lists all files and folders in your current directory:

ls

Common options:

ls -l — shows detailed list with file sizes, permissions, and dates

ls -a — shows all files, including hidden files starting with .

ls -la — combines both options for detailed list of all files including hidden ones

To list contents of a specific folder without navigating to it:

ls documents

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