How to Find and Manage Hidden Files in Ubuntu Linux

If you are transitioning from Windows or macOS to Ubuntu Linux, understanding how the file system manages visibility is crucial for system administration and customization. In Ubuntu, hidden files are used extensively to store user-specific configuration data, application preferences, and sensitive system settings.

Unlike Windows, which relies on a hidden file attribute embedded in the file metadata, Linux uses a brilliantly simple naming convention. Any file or directory that begins with a period (a “dot”) is automatically treated as a hidden file by the operating system.

For example, a file named config.txt is visible, but a file named .config.txt is completely hidden from standard directory listings.

How to View Hidden Files in the GUI (GNOME Files)

For everyday desktop users, the default GNOME file manager provides a very straightforward way to toggle the visibility of dotfiles.

  1. Open the Files application from your Ubuntu dock.
  2. Navigate to your Home directory. This is where the vast majority of your hidden configuration folders (like .config and .local) are stored.
  3. In the top-right corner of the window, click the hamburger menu icon (three horizontal lines).
  4. Check the box next to Show Hidden Files.

Alternatively, you can bypass the menu entirely by using a keyboard shortcut. Simply press Ctrl + H while inside any folder. This instantly toggles the visibility of hidden files on and off. The files will appear slightly faded or translucent, visually distinguishing them from standard visible files.

How to View Hidden Files in the Terminal

If you are managing an Ubuntu server without a graphical interface, or if you simply prefer the speed of the command line, the standard ls command will not display dotfiles by default.

To view all files, including hidden ones, you must append the -a (all) flag to the list command.

  1. Open your terminal application (Ctrl + Alt + T).
  2. Type the following command and press Enter: ls -a

This will output a simple list of every file in the current directory. However, a much more useful command is to combine the -a flag with the -l (long format) flag.

Type: ls -la

This command not only reveals the hidden files but also provides a detailed, human-readable breakdown of the file permissions, ownership, file size, and the date it was last modified.

How to Create Your Own Hidden Files

Because visibility is tied exclusively to the filename, creating a hidden file or directory is exactly the same process as creating a normal one. You simply add a period to the beginning of the name.

To create a hidden text file using the terminal, use the touch command:

touch .my_secret_notes.txt

To create a hidden directory, use the make directory command:

mkdir .hidden_backup_folder

How to Hide an Existing File

If you have an existing file that you want to hide from casual observation, you simply rename it. In Linux, renaming a file is accomplished using the mv (move) command.

For example, if you want to hide a file named financial_records.pdf, you would type:

mv financial_records.pdf .financial_records.pdf

The file instantly disappears from standard graphical file managers and basic terminal lists.

A Warning About Hidden Files

It is important to remember that hiding a file by adding a dot to the filename is a convenience feature for decluttering directories, not a security feature. Anyone with basic knowledge of Linux can instantly view your hidden files using Ctrl + H or ls -a.

If you need to genuinely secure sensitive data on Ubuntu, you must use encryption tools (like GPG or encrypting a zip archive) or strictly manage the file ownership permissions (using the chmod command) to prevent unauthorised user accounts from reading the data.

Get the best tech tips delivered straight to your inbox.

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