# Linux commands: ls

> Learn how the Linux ls command lists the files in a folder, and how the -al option adds details like permissions, owner, and size, plus hidden files.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-08-28 | Topics: [CLI](https://flaviocopes.com/tags/cli/) | Canonical: https://flaviocopes.com/linux-command-ls/

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

```bash
ls
```

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

```bash
ls /bin
```

![Terminal output showing ls /bin command displaying files in columns with colored names like bash, cat, chmod, cp, etc.](https://flaviocopes.com/images/linux-command-ls/Screenshot_2019-02-09_at_18.50.14.png)

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

```bash
ls -al /bin
```

![Terminal output of ls -al /bin showing detailed file listing with permissions, ownership, sizes, and timestamps](https://flaviocopes.com/images/linux-command-ls/Screenshot_2019-02-09_at_18.49.52.png)

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

You have, from left to right:

- the file permissions (and if your system supports ACLs, you get an ACL flag as well)
- the number of links to that file
- the owner of the file
- the group of the file
- the file size in bytes
- the file modified datetime
- the file name

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
