↑↓ move Enter open Esc close

How to Show Hidden Files in Linux

Use ls to show hidden files and directories, including .env and .git.

Linux treats names beginning with a dot as hidden for normal directory listings. They are still ordinary filesystem entries, and `ls -a` reveals them.

Step by step

1 Show hidden names

$ ls -a

Includes hidden entries such as .env, .git and .config.

2 Show details too

$ ls -la

Combines hidden entries with long-format permissions, owner, size and timestamps.

3 Include hidden entries but not . and ..

$ ls -A

Useful when you want dotfiles without the current and parent directory entries.

4 Inspect one hidden file

$ ls -l .env

You can address a hidden file directly even though it does not appear in a normal `ls` listing.

Tips worth knowing

Frequently asked questions

Why does ls not show .env?

Names beginning with `.` are omitted by default. Use `ls -a` or `ls -la`.

What is the difference between ls -a and ls -A?

`-a` includes `.` and `..`; `-A` includes hidden entries but omits those two special directories.

The commands behind it

Concepts involved: File permissions

More how-to guides