Skip to content

Linux commands: ls

New Courses Coming Soon

Join the waiting lists

A quick guide to the ls command, used to list the files in a folder

Inside a folder you can list all the files that the folder contains using the ls command:

ls

If you add a folder name or path, it will print that folder contents:

ls /bin

ls accepts a lot of options. One of my favorite options combinations is -al. Try it:

ls -al /bin

compared to the plain ls, this returns much more information.

You have, from left to right:

This set of data is generated by the l option. The a option instead also shows the hidden files.

Hidden files are files that start with a dot (.).

This command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

Here is how can I help you: