How to show hidden files and folders in Linux

Hidden files and folders in Linux usually hold shell profiles, application settings, and cached state that normal directory listings keep out of the way. Showing them helps when checking what a program stored in a home directory, comparing profile contents, or cleaning up leftover configuration after a change.

On Linux, an entry is hidden by naming convention rather than by a separate filesystem flag. A file or folder whose name starts with a dot is omitted from a default ls listing, ls -a shows every entry, and ls -A keeps hidden entries visible while leaving out the special current-directory . and parent-directory .. entries.

Displaying hidden entries does not change permissions or contents, but editing dotfiles can change shell startup, desktop behavior, and application defaults immediately. The examples use a regular shell and the GNU Coreutils ls behavior shipped by most Linux distributions.

Steps to show hidden files and folders in Linux:

  1. Change into the directory that needs inspection.
    $ cd /home/user/hidden-demo
  2. List the directory normally to see only non-hidden entries.
    $ ls
    visible.txt
  3. Show every entry in the directory, including hidden ones and the special current and parent directory markers.
    $ ls -a
    .
    ..
    .config
    .hidden-folder
    .hidden.txt
    visible.txt

    -a includes all dot-prefixed names, so . and .. appear alongside the actual hidden files and folders.

  4. Show the directory contents with hidden entries included but without the extra current and parent directory markers.
    $ ls -A
    .config
    .hidden-folder
    .hidden.txt
    visible.txt

    -A is often the clearer day-to-day choice because it keeps hidden entries visible while omitting . and ...

  5. Show detailed metadata for the directory contents, including hidden entries.
    $ ls -lA
    total 16
    drwxr-xr-x 2 user user 4096 Apr 14 01:33 .config
    drwxr-xr-x 2 user user 4096 Apr 14 01:33 .hidden-folder
    -rw-r--r-- 1 user user    7 Apr 14 01:33 .hidden.txt
    -rw-r--r-- 1 user user    8 Apr 14 01:33 visible.txt

    Use -lA when the listing needs permissions, ownership, sizes, or timestamps without clutter from . and ...

  6. Inspect another directory by absolute path without leaving the current shell location.
    $ ls -lA /home/user/hidden-demo
    total 16
    drwxr-xr-x 2 user user 4096 Apr 14 01:33 .config
    drwxr-xr-x 2 user user 4096 Apr 14 01:33 .hidden-folder
    -rw-r--r-- 1 user user    7 Apr 14 01:33 .hidden.txt
    -rw-r--r-- 1 user user    8 Apr 14 01:33 visible.txt

    Absolute paths make it possible to inspect hidden entries in another location without changing the current working directory.

  7. Verify that hidden entries are visible by filtering the ls -A output for dot-prefixed names.
    $ ls -A | grep '^\.'
    .config
    .hidden-folder
    .hidden.txt

    No output from this check means the directory has no hidden files or folders whose names start with a dot.