Hidden Files and Folders

As with other operating systems, Ubuntu can make certain folders and files invisible. The purpose is to protect important system files from being accidentally modified or deleted by casual users. Hidden files and folders are ones whose filenames start with a period or dot (.) character.

Although the next chapter will cover Nautilus, the file browsing program, in detail, it’s worth mentioning here that you can look at hidden files when you need to by selecting Edit → Preferences from any file browser and then clicking the Views tab. This brings up a dialog where, among other features, you can check or uncheck the “Show hidden and backup files” box to reveal or conceal files and folders marked as hidden. But remember that they are hidden for a reason, and you should access these files and folders only if you know what you are doing.

On the other hand, if you would like to make a file or folder of your own hidden from casual view, you can do so by creating it (or renaming it) so that it starts with a period. So, if the file is currently called diary, you can hide it by renaming it .diary. The file will temporarily stay visible in the current file browser, but if you navigate away and come back it will be gone, and the only way to view it again will be to enable the display of hidden files.

Get Ubuntu: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.