How to Show Hidden Files and Folders Within Ubuntu

Screenshot showing hidden files

This guide shows how to show hidden files and folders using the file manager within Ubuntu which is called Nautilus (also known as 'Files').

Why Are Some Files and Folders Hidden?

There are two really good reasons for hiding files and folders:

  • It protects the files.
  • It reduces clutter in the main file manager interface.

Many system files and configuration files are hidden by default. Ordinarily, you wouldn't want all the users of a system to be able to see these files.

By having visibility of a system file a user may accidentally click on it and delete it. More inquisitive users may choose to view the file and whilst doing so they may accidentally save changes cause the system to misbehave. There is also the potential for a user to accidentally drag and drop files to the wrong place.

Having too many files visible makes the files you wish to view harder to see. By hiding system files it makes it possible to view only the items you should be interested in. Nobody wants to scroll through long lists of files that they don't need to see in the first place.

How Do You Hide a File Using Linux

Any file can be made hidden within Linux. You can achieve this from within the Nautilus file manager by right clicking on a file and rename it.

Simply place a full stop at the beginning of the file name and the file will become hidden. You can also use the command line to hide a file.

  1. Open a terminal by pressing CTRL+ALT+T.

  2. Navigate to the folder where your file resides using the cd command.

  3. Use the mv command to rename the file and make sure the name you use has a full stop (period) at the beginning.

Why Would You Want to View Hidden Files

Configuration files are quite often hidden within Linux but the whole point of a configuration file is to make it possible for you to configure your system or software packages installed on your system.

How to Run Nautilus

You can run Nautilus within Ubuntu by clicking the icon on the Ubuntu Launcher which looks like a filing cabinet.

Alternatively, you can press the super key and type either "files" or "nautilus". The filing cabinet icon should appear in either case.

View Hidden Files With a Single Key Combination

The easiest way to view hidden files is to press the CTRL+H keys at the same time.

If you do this within your home folder you will suddenly see a lot more folders and indexed files.

How to View Hidden Files Using the Nautilus Menu

You can also view hidden files by navigating the Nautilus menu system.

Menus within Ubuntu may either appear as part of the window of the application you are using, which in this case is Nautilus or they will appear in the panel at the top of the screen. This is a setting which can be adjusted.

Find the View menu and click on it using the mouse. Then click on the Hidden Files option.

How to Hide Files Using a Single Key Combination

You can hide the files again by pressing the same CTRL+H key combination.

How to Hide Files Using the Nautilus Menu

You can hide files using the Nautilus menu by selecting the View menu with your mouse again and by selecting show hidden files again.

If there is a tick next to the "show hidden files" option then hidden files will be visible and if there isn't a tick then the files will not be visible.

Recommended Settings 

Leave hidden files hidden as much as possible because it prevents mistakes being made such as accidentally moving files and folders with a misjudged drag and drop.

It also saves you from seeing clutter that you do not need to see on a regular basis.

How to Hide Files and Folders Using Nautilus

You can, of course, hide files and folders that you wish to have hidden. This shouldn't really be used as a method of securing files because as you have seen from this article it is easy enough to make hidden files visible again.

To hide a file right click on it within Nautilus and choose Rename

Place a dot in front of the file's name. For example, if the file is called "test" make the filename ".test".