How to make files/folder hidden in Linux

By | July 21, 2016

A simple way to make files hidden in Linux is to simply rename such file or folder, beginning the file name with a dot (.) Yeah that simple. In Linux hidden files or directories (folders) are identified by the . That precede their names. For those that still need a step by step method for doing this remaining, Id provide two (one for the command line the other using GUI).

METHOD 1 (GUI):

  • Take your mouse pointer over the file or directory use desire to make hidden.
  • Right-click to reveal a drop-down menu of options.
  • Look for the rename option and select it. Then the file/directory name is highlighted for editing.
  • Then add a dot (.) before whatever name you want to call the file/directory without any space in-between.
  • The press ENTER.

METHOD 2 (CLI):

  • Open the terminal (Ctrl-Alt-T in Ubuntu).
  • Using the mv command rename the file/directory beginning with a dot;

    mv /path_to_file /.path_to_file

    mv /home/alex/fileName /home/alex/.fileName

If you desire to change the location of the file/directory to be hidden you can change the destination path accordingly.

But if you current working directory is where the file/directory is located, use the file/directory name only like this;

mv fileName .fileName

That being done it one thing to make a file/directory hidden, it is another thing to make it fully hidden. You need to set the state of hidden files to whatever you want (visible or not). To make the hidden files visible or not use CTRL+H.

Happy Linux’NG!


NEVER MISS AN UPDATE




I agree to have my personal information transfered to MailChimp ( more information )

Join over 10,000 visitors to receive Open Source tips, trick, news, tutorials, programming and more.

We hate spam. Your email address will not be sold or shared with anyone else.

ALEXANDER OMOROKUNWA
MUST READ  Second-Hand PCs and Linux

Tell us what you think