ls -l option lists all files and directories in the current directory in long listing format.
Syntax
$ ls -l [options] [file|dir]
Examples
Before using the ls -l option, let’s look at the default of the ls command.
➜ ~ ls
![](https://www.linuxcommands.site/wp-content/uploads/2021/10/image-19-1024x122.png)
In the following example, we will show you how to use the ls -l option to display files and directories in a long list.
➜ ~ ls -l
In the following example, we use the ls -al option to display all files and directories in the current directory in a long list, including hidden files.
➜ ~ ls -al