How To Show Hidden Files And Folders Within Ubuntu

How To Show Hidden Files Using Ubuntu

This guide shows how to show hidden files using the default Ubuntu file manager which is called Nautilus. It is also known by the name Files.

What Is A File Manager

A file manager is a tool which enables a user to manage the files in their file system. Windows users will be familiar with a tool called Windows Explorer. 

A file manager generally shows a series of folders and when a user clicks on the folder they can see the subfolders and files that exist within that folder.

A user can use the file manager to copy files from one folder to another, move files and folders around or delete files and folders.

File managers are generally set up to only show files that aren't marked as hidden. This is true of the case whether you are using Linux or Windows. 

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

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 to a hidden 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, and 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 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 and H keys at the same time.

If you do this within your home folder you will suddenly see a lot more folders and indeed 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 and 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 

I recommend leaving 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.

As mentioned previously 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".