In Ubuntu you can work with a file explorer. This can be compared to the Windows explorer. You can open, edit and view files with it.
Linux as an operating system has many different files, so there are many more hidden files compared to Windows. By default, you cannot see these hidden files via the file explorer in Ubuntu (“File manager”).
If you want to show the hidden files in the file explorer you need to enable a setting. If you only want to hide a specific file in the file explorer, this is also possible.
This article shows you two ways to show hidden files in the File Explorer, and one way to properly hide a file.
Show hidden files in Ubuntu Linux
Show hidden files via file manager
To display hidden files via the “file manager”, open “files”. The shortcut for “files” can be found on the left in the taskbar.
If you do not see the “file manager”, click on “show applications” at the bottom left and search for “file manager”.
In the “file manager” menu, click the “more settings” button and click “Show hidden files”. If you enable the “show hidden files” option, you will immediately see all hidden files in the “file manager”.
You recognize Linux hidden files by a “.” period before the file name.
If you want to disable the hidden files now or you want to be able to quickly enable them, press the CTRL + H key combination. This is a keyboard shortcut to enable or disable hidden files.
How to Hide Files in Ubuntu Linux
If you want to hide a file in the file manager, you can simply do this by adding a “.” to place before the file name. The file is then not visible by default in the file manager and via the terminal.
You can create a hidden file in the following way. Open Terminal through the applications. In Terminal go to the location where you want to create the hidden file.
In Terminal enter the following command:
touch .bestandsnaam.txt
De punt before the filename makes the file hidden. You have now created a filename.txt file that is not visible in either the file manager or the terminal.
To display the hidden files via terminal type:
ls -a
To show only hidden files, type:
ls -ld .*
I hope this helped you. Thank you for reading!