How to Hide a Folder in Ubuntu (Simple Step by Step Guide)

How to Hide Folder in Ubuntu
How to Hide Folder in Ubuntu

We all are aware of the fact that we can hide files and folders on Windows and to hide a folder on Windows you just need to right-click on the file or folder you want to hide > click on properties > select the Hidden option > Click on OK. Now your file or folder is completely hidden from the file manager. Additionally, hiding a folder can help you keep your personal data hidden. But, how will you hide your files or folders if you are using Ubuntu? 

Well, don’t worry about it, because I am going to provide you with some of my easy how-to-do steps, which will help you hide your files or folders in Ubuntu, in just a fraction of a second.

So, let’s start the hiding process in Ubuntu!

Steps to hide folder in Ubuntu  

Hiding folders or files is not a hectic task in Ubuntu. You just have to place a period sign (.), in front of the folder or file you want to hide using the simple GUI mode. But if you are confused about how to do it, just follow these simple steps.

Hiding/Unhiding folders using GUI

  1. Open the destination of the file, that you want to hide.
  2. Say you want to hide the Music folder in the Downloads section.
  3. Now, right-click on the Music folder.
  4. Select Rename option. 
  5. Now, just put a period sign or dot (.), in front of the name of the folder and hit enter or OK. For example, rename “Music” to “. Music”, and click OK or press Enter Key.
  6. Tada! You have successfully hidden your folder using the GU Interface of Ubuntu. 

Now, to check if your folder is really hidden or not, just close the existing tab and reopen the destination folder. You, won’t find the “hidden” folder there.

So, if you want to unhide that particular folder just clicks on the destination folder, and press CTRL+H on the Keyboard. Your folder or file is now visible at the moment.

Or, just click on the three-dotted line menu inside the file manager and check the Show Hidden Files option.

Again, to hide it press CTRL+H and that’s it, the folder is hidden. You can also click on the three-dotted line menu in the file manager and uncheck the Show Hidden Files option.

Note: As soon as you close the file manager, the hidden file which was visible by using CTRL+H will disappear automatically. 

Unhiding folder in Ubuntu permanently

As you have learned to hide a folder by putting period sign (.), prior to the file name, now we shall learn to unhide the folder in Ubuntu completely.

 Steps to Unhide the folder in Ubuntu completely 

  1. Go to the destination of the folder using file manager. For example, Files > Downloads.  
  2. Now, press CTRL+H
  3. The hidden folder will appear in front of you.
  4. Now, right-click on the hidden folder and click on rename.
  5. Remove the period or dot sign (.)
  6. Hit enter or click OK.
  7. Done, your hidden folder is not hidden anymore.

Hiding/Unhiding folders using Command-Line App.

Using Graphical Interface seems easy to some users, but some prefer using the Command-Line app to Hide and Unhide folders in Ubuntu.

Here are some steps to hide/unhide folders using the Command-Line app in Ubuntu:

  1. Open Terminal app program using the search bar or by pressing CTRL+ALT+T.
  2. Now in order to hide the file, we need to rename the folder and add a period sign(.), prior to the folder name. Therefore, we will use the “mv” command to rename the folder.
  3. Type the following syntax to rename the folder: “mv “filename” “.filename.” For example, I want to hide the Music folder so I will add the following syntax in the command line app: “mv Music .Music .”
  4. Now, your folder is hidden using the Command-Line app.

Now to toggle between hidden and unhidden folders using the Command Line app, follow these steps:

  1. Type “ls” on Command-Line App.
  2. You will see the list of folders, but not the hidden ones.
  3. So, if you want to see the hidden files type the “-a” flag with the “ls” command. For example: “Downloads$ ls -a”.
  4. Now, you will be able to see the list of hidden folders as well.

How to hide multiple folders at once using GUI in Ubuntu?

This trick is only available on the GUI interface of Ubuntu. So, to hide multiple folders in a file using Ubuntu, firstly create a “. hidden” file in a particular directory and then add the folders you want to hide in it.

For example; Movies will be my initial hidden file, then I will add different folders containing my movie collection inside the “. Movies” file. Once done, I will click on OK or hit enter.

It was that simple, to hide multiple folders in a single “. hidden” file.

Note: This trick will only work for current directories you are in, not on the nested ones.

Final Remarks

Using Ubuntu not only gives the user better control over the functions but also provides you with these easy tricks to hide/unhide folders. Thus, you can now create your own hidden folder or file by just using (.) dot either with the help of the Command-Line App or by using GUI in Ubuntu.