How to Show Hidden Files in Linux (Terminal and File Manager)
If you have ever opened a folder in Linux and wondered where your configuration files went, you are not alone. By default, Linux hides files and folders whose names begin with a dot. Learning how to show hidden files in Linux is a first practical skill for new users, and it helps experienced users edit settings, back up profiles, and fix strange application behavior.
This guide explains what hidden files are, why Linux hides them, and how to reveal them in the terminal and in file managers. It covers ls -a and ls -la, safe working habits, and a comparison of the main methods.
What Are Hidden Files in Linux?
A hidden file, often called a dotfile, is simply a file or folder whose name starts with a dot, such as .bashrc, .config, or .ssh. There is no special hidden attribute. The dot is the whole mechanism: ordinary listings skip these entries, while tools told to show all files include them.
Hidden files are not secret or encrypted by default. They are hidden for convenience, so everyday folders are not crowded with settings. Your home directory is the best example. An ordinary listing shows Documents, Downloads, and Pictures. Reveal hidden entries and you also see files that store shell settings, desktop preferences, browser profiles, SSH keys, and application data.
For example, .bashrc sets up your Bash shell each time a terminal opens. The .config directory holds settings for many desktop applications. The .cache directory stores temporary data that programs can rebuild. The .local directory holds user-installed data, and .ssh holds keys for secure remote connections.
Why Linux Hides Files by Default
Linux hides dotfiles to keep listings readable, to reduce accidental damage to configuration files, and to follow a long-standing Unix convention. That convention makes tools predictable across distributions: by default they hide dotfiles, and there is usually a simple option or shortcut to show them.
How to Show Hidden Files in the Terminal
The terminal is the fastest and most precise method, and it works the same way on Ubuntu, Fedora, Debian, Arch, and most other distributions. You do not need to install anything extra.
Use ls -a to list all files
The command ls on its own lists visible files only. Add -a, short for all, and it includes hidden entries:
ls -a
Run this in your home directory and you will see .bashrc, .profile, and .config alongside your usual folders. The first two entries, . and .., mean the current directory and the parent directory. They are always present and are not files to edit.
Use ls -la for details
For most real work, ls -la is more useful. It combines -a with -l, the long format, so each file appears on its own line with permissions, owner, size, and modification date:
ls -la
This view helps you see whether a file is readable, when it was last changed, and whether it is a file, directory, or symbolic link. When troubleshooting, the date alone often shows whether a recent change caused a problem.
Show hidden files in a specific folder
You do not need to change into a folder first. Give ls -a a path, for example:
ls -la ~/.config
The tilde, ~, means your home directory, so this lists your configuration directory in one step. Replace ~/.config with any path, such as /etc or a project folder.
Show only hidden files
To see just dotfiles, use this pattern:
ls -d .*
The -d option lists the matching entries themselves, rather than the contents of matching directories. Without -d, the command would also list the current and parent directories, producing a very long output. For details, use ls -ld .*
Other useful terminal options
The command ls -lah adds human-readable sizes, so 4096 bytes appears as 4.0K. The command ls -a -t sorts by modification time, newest first. If you only need to check one file, ls -la .bashrc is quicker than scanning a full listing.
How to Show Hidden Files in a File Manager
If you prefer a graphical view, every major Linux file manager can show hidden files with a shortcut or menu option. The change is usually temporary, and the same shortcut hides them again.
Nautilus (GNOME Files, used in Ubuntu)
In Nautilus, used by Ubuntu and other GNOME desktops, press Ctrl+H to toggle hidden files. You can also open the menu and select Show Hidden Files. Hidden items appear slightly faded, so they are easy to recognize.
Dolphin (KDE Plasma)
In Dolphin, the KDE file manager, press Alt+. (Alt and the full stop key) to show hidden files, or open the View menu and select Show Hidden Files. Dolphin split views can help when comparing a configuration folder with a backup copy.
Thunar and file dialogs
In Thunar, the Xfce file manager, press Ctrl+H, just as in Nautilus. The same shortcut often works in Open and Save dialogs, so you can open a dotfile directly from an application. If Ctrl+H does not work, look for Show Hidden Files in the dialog menu.
Method Comparison: Terminal vs File Manager vs Distro Tools
| Method | How to show hidden files | Best for | Limitation |
|---|---|---|---|
| Terminal (ls -a) | Run ls -a in any folder | Quick checks, scripts, servers | Text output only; no previews |
| Terminal (ls -la) | Run ls -la for permissions and dates | Troubleshooting and audits | Long output in large folders |
| Nautilus (GNOME / Ubuntu) | Press Ctrl+H or use Show Hidden Files | Everyday browsing on Ubuntu | Setting is per-window and temporary |
| Dolphin (KDE) | Press Alt+. or use View menu | KDE users and split views | Shortcut differs from GNOME |
| Thunar (Xfce) | Press Ctrl+H or use View menu | Lightweight desktops | Fewer preview features |
| File dialogs | Press Ctrl+H in Open and Save dialogs | Opening a dotfile in an app | Dialog behavior varies by toolkit |
The pattern is clear. The terminal gives you the same commands on every distribution, which is why it is the method to learn first. File managers are better for browsing, previewing, and dragging files visually, but their shortcuts differ slightly. Distro-specific tools rarely add a better method; they lead back to the same file manager or terminal options. If you remember ls -a and Ctrl+H, you are covered on almost any Linux system.
Worked Example: Finding a Broken Shell Setting
Suppose every new terminal window shows an error, but your documents are untouched. Reveal hidden files in your home directory and check shell configuration files first. Start with ls -la ~ and look at the dates next to .bashrc and .profile. If .bashrc changed minutes before the problem began, it is the prime suspect. Open it, find the recent change, and correct it. If unsure, back it up first with cp .bashrc .bashrc.backup, so you can restore the working version in seconds.
How to Hide Files Again
To hide files again, run ls without -a in the terminal. In Nautilus and Thunar, press Ctrl+H again; in Dolphin, press Alt+. again. This only changes what is displayed. It does not delete or protect the files, and anyone who knows the dotfile rule can reveal them again.
To hide a file of your own, rename it so its name begins with a dot. For example, mv notes.txt .notes.txt makes notes.txt hidden in ordinary listings. To show it again, remove the dot: mv .notes.txt notes.txt. Keep a note of files you hide deliberately, because they are easy to forget during a backup or move.
Safety Tips When Working With Hidden Files
Back up a configuration file before editing it, especially .bashrc, .profile, and anything inside .ssh. Never delete a dotfile just because you do not recognize its name; search for its purpose first, or move it to a backup folder. Avoid changing permissions on .ssh files unless you know the correct values, because SSH refuses keys that are too openly accessible. Do not run bulk-delete commands with a dot pattern without a verified backup.
For related Linux guidance, see our guide on how to check your Ubuntu version, which uses the same terminal skills, and our guide to enabling Stereo Mix on Windows for another example of revealing a hidden setting. If you work with disks as well as files, our MBR vs GPT guide explains partition styles that affect how storage is organized.
Frequently Asked Questions
What is the command to show hidden files in Linux?
Use ls -a to list all files, including hidden ones, or ls -la for the same listing with permissions, sizes, and dates.
How do I show hidden files in Ubuntu Files?
Open Files (Nautilus) and press Ctrl+H, or open the menu and select Show Hidden Files. Press Ctrl+H again to hide them.
Why are files hidden in Linux?
Files whose names start with a dot are treated as hidden to keep folders readable and to reduce accidental changes to configuration files.
How do I hide a file in Linux?
Rename it so its name starts with a dot, for example mv notes.txt .notes.txt. Remove the dot to make it visible again.
Is it safe to delete hidden files?
Not without checking first. Hidden files often store application settings, so back up a file or move it aside before deleting it.
Conclusion
Showing hidden files in Linux is simple once you know the rule: a leading dot hides a file, ls -a reveals it in the terminal, and Ctrl+H reveals it in most file managers. Start with ls -la when you need detail, use your file manager to browse visually, and back up configuration files before changing them.
[…] called .vimrc in your home directory, and if you need to find hidden files like that, our guide on how to show hidden files in Linux explains both the terminal and the file manager […]
[…] a related file-management skill, see our guide on how to show hidden files in Linux. Hidden files can appear inside archives too, and knowing how to reveal them in Dolphin helps you […]