How to Hide Files / Folders (Without Renaming) in Ubuntu 18.04

gnome shell

This quick tip shows beginners how to hide files or folders, without renaming them, in Ubuntu’s default Nautilus file browser.

In Ubuntu Linux, a file (or folder) with a name starts by a dot (.) is considered a hidden file. Filename ends with a tilde (~) is considered backup file which is also hidden.

You can press Ctrl+H on keyboard to show or hide hidden files / folders in file browser.

To hide files and/or folders, without renaming them by prefixing dots (.) or suffixing tildes (~), you can use an extension called nautilus-hide.

NOTE following steps works for all current Ubuntu releases, though the title says for Ubuntu 18.04.

1.) Open terminal either by searching for “terminal” from application menu or by pressing Ctrl+Alt+T on keyboard.

When terminal opens, run command to install the extension:

sudo apt install nautilus-hide

2.) Then restart Nautilus either via reboot or by running command:

nautilus -q

Finally in Nautilus file browser, select ‘Hide Files’ in files’ context menu (right-click menu).

To un-hide them, press Ctrl+H to show hidden files, then either select “Unhide Files” in hidden files’ context menu or remove the .hidden file.

NOTE: The extension works by adding file or folder names, that you choose to hide, into .hidden file (auto-create if not exist). Nautilus reads that file to hide the listed files the next time you open or refresh the folder.