Home Linux How to Hide A File or Folder in Linux

How to Hide A File or Folder in Linux

At your workplace, there might be a shared computer that you use quite often. The computer use Linux as the operating system and you have plenty enough classified files and folders on it. To prevent your colleagues from accessing your files/folders, you decided to hide them.

Hiding a file or folder in Linux is straightforward. You can do it be it via command line or GUI. All you need to do is rename the file/folder you want to hide and add the dot (“.”) character as the prefix.

Follow the steps below if you want to hide a file/folder in Linux and you haven’t known how to do so.

Hiding a file/folder in Linux via command line

If you want to look geeky, you can use command line to hide a file/folder on Linux. As said, all you need to hide a file/folder in Linux is by renaming it. In Linux, you can use the command of mv to rename a file or folder. Here is the example.

mv camera_thief.jpg .camera_thief.jpg

You can then use the ls command to see the files on the current directory. This command (ls) will show files on the active directory, with the exception of hidden files/directories. If you want to see all files on the active directory — including hidden files/folders — you can use the option of -a.

ls -a

Hiding a file/folder in Linux via GUI

The idea of hiding a file/folder via GUI is no different to hiding a file/folder via command line as explained above. To do so, open the file manager of the Linux distro you use and rename the file/folder you want to hide.

In most cases, your file/folder won’t be immediately disappear once you added the dot character. You need to reload the active directory first to apply the changes.

To see the hidden files/folders from the GUI mode, you can go to the View menu on your file manager and check the Show Hidden Files option.


The demonstration of GUI method above uses Nautilus, the default file manager on Ubuntu.

This page may contain affiliate links, which help support bettertechtips.com. Learn more


Please enter your comment!
Please enter your name here

Recent Posts