In Linux, files and folders are hidden by simply adding a dot (.) at the beginning of their names. This naming convention is used across the system to differentiate between normal and hidden files. It is a straightforward method to keep system and configuration files out of sight unless needed.

Unlike systems such as Windows, where file visibility is determined by attributes, Linux relies entirely on this dot prefix. The simplicity of this approach allows users to manage hidden files without changing any file properties. To hide a file, just rename it with a leading dot; to unhide it, remove the dot.

This method works with both graphical file managers and terminal commands. Whether using GNOME Files, Dolphin, or the command line, the process of hiding and unhiding files remains the same. Understanding this functionality is essential for managing system files and maintaining an organized workspace.

Steps to hide and unhide files and folders in Linux:

  1. Open the terminal or a file manager.
  2. Locate the file or folder you want to hide or unhide.
    $ ls temp/
    file  folder
  3. To hide a file or folder, add a dot (.) to the beginning of its name.
    $ mv temp/file temp/.file
  4. Confirm the changes by listing the directory contents or refreshing the file manager.
    $ ls temp/
    folder
  5. To unhide a file or folder, remove the dot (.) from its name.
    $ mv temp/.file temp/file
  6. Confirm the changes again by listing the directory contents or refreshing the file manager.
    $ ls temp/
    file  folder
Discuss the article:

Comment anonymously. Login not required.