How to Show Hidden Files in Ubuntu Linux

We can hide the files for privacy or avoid accidental deletion in Ubuntu Operating System. The hidden files use the system’s storage but are not visible to the user. When we install the Linux Operating System, many system files are installed but are hidden.

In this article, different methods will be performed to show/unhide the hidden files. The post’s content is as follows:

Let’s start!

How to Hide Files in Ubuntu?

The hidden files have a dot “.” before the file’s name, i.e., “.itslinuxfoss.txt” let’s see how we can hide files in Linux. The “mv” command can be used to rename the files, from where you can rename it and add a dot “.” before the filename. To hide a file named “file1.txt”, we will use the below command:

$ mv file1.txt .file1.txt

The result of the “ls” command ensures that the “file1.txt” is now hidden.

How to Show Hidden Files in Ubuntu?

In Ubuntu, several ways can be used to unhide the file. In this guide, we will discuss the below methods to show the hidden files in Linux:

Method 1: Show Hidden Files Using CLI

The easiest way to show the list of files available in a directory is using the “ls” command. The “ls” command offers a variety of flags for showing hidden files in Ubuntu.

To show all files (including hidden files/directories), execute the “ls” command with the flag “a” in the terminal as shown below:

$ ls -a

The output is also showing the hidden files (.<file>).

The “A” flag performs the same function as the “a” flag to unhide hidden files as shown below::

$ ls -A

List the Hidden Files With Details

To get a list of the hidden files only with all their technical details, as can be shown using any of the below-mentioned two commands:

$ ls -al

Method 2: Show Hidden Files Using GUI

The GUI of Ubuntu can also be utilized to show hidden files. There are two ways to show hidden files via GUI that are listed below and are explained as well:

  • Using the Shortcut Key
  • Using File Manager

Let’s start with the first one:

Using Shortcut Key

We can show the hidden files in a directory by pressing the “CTRL + H” shortcut key. To do so, navigate to the directory where you want to search for the hidden files and press “CTRL+H”:

Before Using the shortcut key, the files are hidden:

After using the shortcut key, it is observed that the hidden files are displayed:

Note: The “Ctrl+H” shortcut key is used to show/hide files.

Using the File Manager

Another way to unhide the hidden files in Ubuntu is using the “Hamburger icon” from the top menu toolbar of the directory. Clicking the icon will show a drop-down list; ensure the “Show Hidden Files” option is checked.

When the “Show Hidden Files” option is checked, the hidden files will show up permanently in the directory as shown below:

That’s the end of this guide!

Conclusion

To show the hidden files in Ubuntu, use the command “ls -a” command or the other options of the “ls” command. The user can also see the hidden files using the shortcut key “CTRL + H” or the “Hamburger icon” from the top menu bar. This post has demonstrated the possible methods to show hidden files in Ubuntu.