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:
- Open the terminal or a file manager.
- Locate the file or folder you want to hide or unhide.
$ ls temp/ file folder
- To hide a file or folder, add a dot (.) to the beginning of its name.
$ mv temp/file temp/.file
- Confirm the changes by listing the directory contents or refreshing the file manager.
$ ls temp/ folder
- To unhide a file or folder, remove the dot (.) from its name.
$ mv temp/.file temp/file
- Confirm the changes again by listing the directory contents or refreshing the file manager.
$ ls temp/ file folder

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.