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, I’d 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.
- Support Open source: Hacktoberfest 2022 is Upon Us, Preptember is here! - September 14, 2022
- What are Linux Virtual Desktops and How to Use Them with Ubuntu Linux? - June 6, 2022
- Facts You Should know About Pyscript: A web Development Framework - May 31, 2022