How to Stop Ubuntu from Automatically Showing Hidden Files

The Cluttered File Manager

In Ubuntu, like most Linux environments, files and folders that begin with a dot (e.g., `.config`, `.bashrc`) are treated as hidden system files. The default file manager, Nautilus, hides these files to keep your home directory looking clean and to prevent accidental modification of critical configuration data. However, if you are a developer or power user who frequently edits these files, you might find yourself constantly pressing `Ctrl + H` to reveal them. While toggling them on temporarily is useful, some users accidentally save the view state, causing Nautilus to automatically show all hidden files every time a new window is opened, resulting in a chaotic, unreadable mess of dotfiles dominating your screen.

Restoring the Hidden File Default

To stop Ubuntu from automatically showing hidden files every time you open Nautilus, you need to toggle the view setting back off and ensure it saves as the default state.

Open a new Files (Nautilus) window. If your screen is currently filled with hidden files (items starting with a `.`), the setting is currently active. You can quickly toggle it off by pressing the keyboard shortcut Ctrl + H. To ensure this change persists across sessions, navigate to the top-right corner of the Nautilus window and click the hamburger menu icon (three horizontal lines). In the drop-down menu, look for the option labeled Show Hidden Files. If there is a checkmark next to it, click it to uncheck the option. This updates the underlying `gsettings` configuration for Nautilus. Close the window and open a new one; your directories should now be clean and free of system files by default. You can always press `Ctrl + H` to temporarily view them when explicitly needed.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.