If you have multiple folders and files to hide on Linux then we can do that just using a text file, here we will know how?
Well, we can hide folders and files in Linux using a traditional method that is adding periods in front of their names. For example, if you rename the “Documents” folder as “.Documents”, it will disappear from view. The same as if you do it with any other type of file, it will be hidden.
Moreover, this method is the default on all Linux to hide folders and configuration files. To see hidden items the user can use the “Ctrl + H” key combination and the same to hide them again.
However, rather than doing that we can easily hide multiple files and directories by just adding their names in a file. Because there are many folders that are either created by us or some program in our home directory and if you don’t access them regularly and want to make your directories look cleaner then here is a simple way.
How to hide Linux folders and files without the period
Step 1: In the folder where you want to hide other folders or files create a plain text file with the name “.hidden” (this one goes with the period but without the quotes). You can also use the terminal if you want.
Step 2: Write the name of the folders or files that you want to hide in the .hidden file you have created. Each line must have only one item.
Step 3: Once done, save the file and hit the “F5” key to refresh the folder items.
Step 4: The files you have mentioned in the .hidden file will automatically get hidden. To see them you can see Ctrl+H, and the same to hide them again…
In this way, we can easily and instantly hide files and folders on Linux operating system. I have tried it on Ubuntu 20.04 Gnome, however, this will work for other desktop environments as well. Try it out.