Open In App

Viewing and Creating Hidden Files in Linux

Last Updated : 01 Nov, 2025
Comments
Improve
Suggest changes
5 Likes
Like
Report

In Linux, hidden files are files or directories whose names begin with a dot (.) and are not displayed by default when listing directory contents.

  • Hidden files are used to store configuration settings and system-related data.
  • They are typically hidden to prevent accidental changes or deletions by users.
  • Viewing and creating hidden files allows users to manage and customize system behavior when needed.

Hidden files can be viewed using two different methods: the command line and the GUI.

Method 1: Command line to View Hidden Files in Linux

Execute the below command to view all the hidden files in the terminal itself.

$ ls -a 
Command line to View Hidden Files in Linux

This command will show every hidden record (whose names start with a . (dot) image) in your ongoing Terminal catalog.

Method 2: File Manager Toolbar Hidden Files in Linux

To display hidden records in Linux File manager:

  • Open the file manager.
  • Click on the "three-bar" or "options" menu at the top right.
  • Select "Show Hidden Files" (or press the keyboard shortcut 'Ctrl + H').
Image

This will show every hidden record (whose names start with a . (dot) image) in your ongoing Terminal catalog.

Note: "Ctrl + H" is a keyboard shortcut used to show hidden files.

Creating Hidden Files in Linux

Creating Hidden Files can be done in two best ways in Linux:

  • Method 1: Command Line to Hide Files in Linux
  • Method 2: GUI (Graphical User Interface) to Hide Files in Linux

To hide a record in Linux, you have to add a spot (.) toward the start of the filename. 

Method 1: Command-line to Hide Files in Linux

Hide the file by moving it under a new filename. The period (.) at the beginning of the new filename indicates that it’s hidden.

$ mv Firefox-Temp-Binary .FF-test
Command-line to  Hide Files in Linux

After renaming by adding '.' (dot) with '$ls' command file cannot be viewed as it is hidden.

Method 2: GUI (Graphical User Interface) to Hide Files in Linux

You can also hide files through the graphical interface by renaming them with a dot at the beginning of the file name.

Step 1: Right-click on the file and select the Rename option.

select the Rename option

Step 2: Make the file hidden by placing a .(dot) at the beginning of the filename.

Make the file hidden by placing a .(dot)

Renaming the file by clicking 'Rename' and adding .(dot) at the beginning of the new file name will hide the file. Once renamed, the file will become hidden in your file manager.

Unhiding files in Linux:

Just as you can hide files, you can also unhide them by renaming them and removing the dot from the beginning of the file name.

We can unhide by 2 different methods:

  • Method 1: Command-line to Unhide File in Linux
  • Method 2: File Manager toolbar (GUI) to Unhide File in Linux

Method 1: Command-line to Unhide File in Linux

Use the 'mv' command to rename the hidden file and remove the dot from the file name:

$ mv .FF-test Firefox-Folder
Image

This command makes the file visible again.

Method 2: File Manager toolbar (GUI) to Unhide File in Linux

To unhide hidden records in Linux File manager:

  • Click the three even bars symbol at the upper right corner of the File Manager. Thusly, a drop-down menu will appear. From that point, check the Show Hidden Files check box. As a result, hidden records can be viewed in the File Explorer. Then renaming the hidden file by removing '.' (dot) at the beginning of the file, the name will unhide the file.
click the three even bars symbol at the upper right corner
  • Click on the Rename option.
Click on the Rename option.
  • After renaming the file by removing . (dot) in front of the file will make the file unhidden. 

Note: "Ctrl + H" keyboard shortcut is used to show hidden files. After hidden files are shown renaming the file by removing . (dot) in front of it make the file from hidden to normal. That's how GUI way used to unhide a file.

Unhide a file

After renaming the file removing .(dot) in front of the file will make the file unhidden. 

make the file unhidden

Hiding Files via Keyboard shortcut (GUI)

To hide unhidden files in Linux "Ctrl + H" keyboard shortcut is used.

Hiding Files via Keyboard shortcut
Suggested Quiz
5 Questions

Which command displays hidden files along with normal files?

  • A

    ls

  • B

    ls -l

  • C

    ls -a

  • D

    ls -t

Explanation:

ls -a shows all directory items including hidden ones beginning with a dot.

What makes a file hidden in Linux?

  • A

    Giving it read-only permission

  • B

    Renaming it with a starting dot (.)

  • C

    Moving it to /hidden directory

  • D

    Removing execution rights

Explanation:

A file becomes hidden simply when its name begins with a dot (e.g., .config).

Which GUI shortcut instantly toggles hidden file visibility in File Manager?

  • A

    Ctrl + Shift + H

  • B

    Alt + H

  • C

    Ctrl + H

  • D

    F2

Explanation:

Ctrl + H shows or hides hidden files in most Linux desktop environments.

Which command makes the hidden file .FF-test visible again?

  • A

    mv .FF-test .FF

  • B

    mv .FF-test ./FF-test

  • C

    mv .FF-test FF-test

  • D

    mv .FF-test /FF-test

Explanation:

Removing the leading dot in the name restores normal visibility (mv .FF-test FF-test).

After hiding a file via GUI by renaming, why does it disappear from view?

  • A

    It was deleted

  • B

    Linux auto-moves it to /etc

  • C

    Renaming added a dot which makes File Manager hide it by default

  • D

    System restarted file services

Explanation:

File managers hide any item starting with a dot unless hidden files are set to be shown.

Image
Quiz Completed Successfully
Your Score :   2/5
Accuracy :  0%
Login to View Explanation
1/5 1/5 < Previous Next >

Article Tags :

Explore