ls -a option lists all files and directories in the current directory, including hidden files starting with “.”
Syntax
$ ls -a [options] [file|dir]
Examples
In the following example, we use the ls -a option to list files and directories, including hidden files starting with “.”.
➜ ~ ls -a
![](https://www.linuxcommands.site/wp-content/uploads/2021/10/image-12-1024x241.png)
In the following example, we use the ls -al option to display files and directories in a long list format, including hidden files starting with “.”.
➜ ~ ls -al