How to hide a file or folder in Linux?

Hiding a folder is a simple way of keeping prying eyes away from your private documents. From a human point of view it’s a good solution; what you can’t see, you don’t know you want. Encrypting a folder can have the opposite effect. The folder is visible and if access is attempted, the need to enter a password positively shouts the message that someone is trying to hide something. This probably explains why there are so many commercial utilities that claim they can securely hide folders.

Hiding a file is pretty simple in Linux ! Its just one step away :)

Steps to hide a folder :

  1. Select the folder you wish to hide and rename it by either clicking F2 in keyboard or by a right click -> Rename..

  2. Add a ‘. ‘ (dot) in front of the name of the folder and press Enter
  3. Press F5 and now you cannot view that folder!

You are done !

Steps to view Hidden Folder :

The following step is used to Show/View the Hidden files.

  1. Just Open the desired directory and press Ctrl+H or Click View->Show Hidden files to view all the hidden files :)


  2. You can test to see if hidden files are being displayed by navigating to other folders
  3. You can Rename the folder anytime by removing ‘.’ from the folder name to revert it back to a normal one !

Now you know how to see all hidden folders on your computer in just a click away.The same Steps can be applied for files too !

If you liked reading this post you might want to check out

Will post more articles for newbies to Linux.:-) What are you views on Linux? Do you use Linux? Drop in your comments.

No related posts.

  • Balaji

    ya am using ubuntu10.04,am using xfce environment. can u tell me how to mount windows partition here..

    • sharmili

      It is not necessary to configure it manually. When you install Ubuntu package, it will be asked whether to access the Windows partition, where you can just check the partition and check ok.

    • http://www.ijeyanthan.com Jeyanthan

      Goto System-> Administration -> Disk Utility and you will find your entire HD partition here! :)

  • sharmili

    Very useful.

    • http://www.ijeyanthan.com Jeyanthan

      Thank you :)

  • http://screamable.com/ Akshay

    useful :) :)

    • http://www.ijeyanthan.com Jeyanthan

      Thank you :)

  • venkat

    Hey Guys,

    The above technique has just to hide the folder and there may be chance of opening it by “Ctrl+H”. I have got a better idea to prevent even from opening the directory. Only root user can open and view and edit the files in the directory.. Follow the instruction below to achieve that.

    mkdir ~/Test

    cd ~
    sudo chown -R root:root Test
    sudo chmod 111 Test/

    Thats it , Only root can view and edit the folder as said above.

    Have nice linux-tweaking…

    Venkat

    • balaji

      It will be helpful if u tell what the above commands will actually do

  • venkat

    Sure, I will explain in detail

    mkdir ~/Test [“mkdir” is to create a new directory in the home folder where you have logged in].

    cd ~ [navigating to the home directory usinf “cd ~”]

    sudo chown -R root:root Test [here, we are changing the ownership of the folder “Test” to root by using chown, “chown”-means chnaging ownership.]

    sudo chmod 111 Test/ [here, we are changing the rules of who to do what, refer
    http://www.onlineconversion.com/html_chmod_calculator.htm for chmod]

  • http://hackhow.com Vishal

    Nice post dude..

  • shubham

    thanks man lokking at the comments and the authoer all are indians ???

    • http://devilsworkshop.org Aditya Kane

      @Shubham: Yes, considering we are an tech blog form India and seeing how popular Linux is in India, it is not surprising. :-D