How to make files/folder hidden in Linux

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!

Share!

ALEXANDER WAYNE OMOROKUNWA

ALEXANDER WAYNE OMOROKUNWA

Chief Editor/Founder at FossNaija
A Linux enthusiast with a focus on enriching the Nigeria Linux experience and keeping a keen eye on Ubuntu and other Foss related developments.
ALEXANDER WAYNE OMOROKUNWA

Latest posts by ALEXANDER WAYNE OMOROKUNWA (see all)

READ  How to Install Synaptic Package Manager in Ubuntu Linux

Tell us what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.