TechTronBlog.com

Technology, Innovation, Collaboration
Menu
  • Features
  • Gadget
  • Mobile
  • Uncategorized

Daily Tech Updates Sent to your Email

Join our Newsletter
Home
Features
How to hide files from any file manager on the Linux desktop
Features

How to hide files from any file manager on the Linux desktop

August 17, 2020

Want to hide files and folders from your Linux desktop file manager? Jack Wallen shows you one handy method.

” data-credit=”Image: Getty Images/iStockphoto” rel=”noopener noreferrer nofollow”>Cybersecurity and data privacy protection concept, lock, binary digits background

Image: Getty Images/iStockphoto

You probably already know the traditional method of hiding files on the Linux command line. If not, any file that begins with a . will not be seen with the ls command, unless you add the -a option. Those same files and directories will be hidden from the file manager unless you explicitly tell the file manager to show those secreted files.

This is a handy way to hide sensitive information (such as app configurations and the like) away from prying eyes. Although not truly a means to security, it shouldn’t be overlooked as an additional layer.

SEE: Windows 10 security: A guide for business leaders (TechRepublic Premium)

But, did you know there’s another method to hide files and directories from desktop file managers–one that makes it such that you can hide standard directories away from sight, without having to prepend a . to the directory name? This can come in handy for directories that already exist, and you cannot change their names (such as the ~/snap directory).

There are two caveats to this method. The first is that it behaves in similar fashion to the standard . directory. In other words, you can reveal those hidden files and directories in the same way. For instance, with the Nautilus file manager, hit the Ctrl+h key combination to hide or reveal hidden files/directories. The second caveat is that it doesn’t work with the command line. So even though Nautilus might not reveal those hidden files, the ls command will–even without the -a option.

Even so, this is still a very handy method of hiding files and directories. 

Let me show you how.

What you’ll need

The only thing you’ll need to make this work is a running instance of Linux with a desktop. You also should have some files and directories to hide (but that’s a given).

How to hide files and directories from the file manager

Let’s say you have three directories and two files to hide from the file manager. Those directories are:

The files to be hidden are:

To hide these files and directories from the file manager, create a new file with the command:

nano ~/.hidden


In that file you would add the following:

snap
code-server
PYTHON
somefile.txt
license.xml


Save and close the file. 

Close out your file manager and re-open it. You should no longer be able to see those files unless you instruct the file manager to reveal hidden files.

If you want to hide folders outside of your home directory, you have to create a .hidden file in the root of the folder to be hidden. For example, if you’re hiding directories or files in the root directory, issue the command:

sudo nano /.hidden


Say, for example, you want to hide the /opt folder. For that you’d create a .hidden file in / with the contents:

opt


Save and close the file, restart your file manager, and the /opt directory will no longer appear. 

Although this isn’t a foolproof way to hide files (as anyone who knows how to reveal hidden files and folders in the file manager can easily reveal them) it’s an easy method to hide any file or directory on your system.







Cybersecurity Insider Newsletter


Strengthen your organization’s IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices.
Delivered Tuesdays and Thursdays




Sign up today




Also see

Editor’s note: This article was corrected by the author to include the sudo nano /.hidden command.


Share
Tweet
Email
Prev Article
Next Article

Related Articles

https://www.techrepublic.com/article/fortnite-maker-epic-games-battles-apple-and-google-over-app-store-ouster/#ftag=RSS56d97e7

Fortnite maker Epic Games battles Apple and Google over app store ouster

https://www.techrepublic.com/article/how-to-install-the-proxmox-virtual-environment-virtualization-management-solution/#ftag=RSS56d97e7

How to install the Proxmox Virtual Environment virtualization management solution

About The Author

Leave a Reply

Cancel reply

Recent Posts

  • New tech and gadgets you absolutely can’t miss
  • Razer Pro Click ergonomic wireless mouse maximizes your productivity
  • Lume Cube Panel Mini Bicolor LED Light provides on-the-go lighting for photographers
  • LINKA LEO GPS Smart Bike Lock can track your bicycle’s movements in more than 100 countries
  • Razer Pro Glide soft mouse mat cushions your hand during use

Recent Comments

    Archives

    • August 2020

    Categories

    • Features
    • Gadget
    • Mobile
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    TechTronBlog.com

    Technology, Innovation, Collaboration
    Copyright © 2021 TechTronBlog.com
    Theme by MyThemeShop.com

    Ad Blocker Detected

    Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

    Refresh