Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » How to Show Hidden Files in Ubuntu 22.04 LTS (and hide them)
    Ubuntu

    How to Show Hidden Files in Ubuntu 22.04 LTS (and hide them)

    Zunaid AliBy Zunaid AliMay 25, 2022No Comments5 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Ubuntu Server Debian
    Share
    Twitter Reddit Telegram WhatsApp Email

    Hiding a file or folder is a feature that helps you increase your device’s privacy and security. You wouldn’t want a 5-year-old child to mess up your most essential documents. And how would you feel if someone deleted your hours of work just as a prank?

    Contents

    • Show Hidden Files in Ubuntu 22.04 LTS (Jammy Jellyfish)
      • Method-1: Using the ls command (terminal)
      • Method-2: Using the dir command
      • Show hidden files only
      • Method-3: Using the file manager(GUI)
    • Hide files on Ubuntu (Terminal & GUI)
      • Method-1: Use the mv command
      • Method-2: Press F2 to rename the file
      • Method-3: Rename file from file options
    • Ubuntu Show Hidden Files – Conclusion

    The easiest way to tackle such ‘accidents’ is to keep your files hidden and later unhide them when needed. If you don’t know how to hide and unhide files on Ubuntu, then good news for you. Because that’s exactly what we will cover here.

    Let’s show you how.

    Show Hidden Files in Ubuntu 22.04 LTS (Jammy Jellyfish)

    You can see hidden files using the terminal or the GUI. We’ll show you both ways so you can choose your preferred method.

    Method-1: Using the ls command (terminal)

    Open your terminal. The current directory is the home directory when you open the terminal. You can navigate to the destination directory where you want to see the hidden files. Use the cd command to go to the directory. Say, you would like to see the hidden files inside Pictures. This is how you go into the Pictures directory.

    cd [parent/destination]

    For this tutorial’s purpose, I’m just going to stay on the home directory. So I don’t need to apply the cd command.

    To display the files and directories within a directory, you use the ls command.

    Ls Command To Check The Files

    But there are no hidden files shown here. To show hidden files, you need to use the -a flag with the ls command.

    ls -a

    After using the above command, you will see some new files appearing with a period(.) in front of them(without parentheses).

    Files Starting With Dot
    Files starting with a period(.)

    These are the hidden files. -a stands for all. So when you add the -a flag with the ls command, the files starting with a period(.) (in other words, hidden files) are not ignored and are shown.

    Method-2: Using the dir command

    The dir command works in a similar way as the ls command. It displays the content inside a directory. In order to display hidden files, you have to use the -a flag again

    dir -a
    Showing Hidden Files Using Dir Command

    Show hidden files only

    If you want to show hidden files exclusively, and no other files, then use this command

    ls -d .[^.]*
    Display Only Hidden Files In Ubuntu

        

    Likewise, you can also use the dir command in the same way.

    dir -d .[^.]*

    It will only display the hidden files and directories.

    Dir Command For Hidden Files

    Method-3: Using the file manager(GUI)

    If the terminal isn’t your thing then you can show hidden files from the GUI as well.

    Go to the destination directory using the file manager.

    File Manager

    For me, it’s the home directory. There are two ways you can reveal the hidden files.

    1. Using the keyboard shortcut
    2. Ticking Show Hidden Files from the view options

    To show the hidden files using the keyboard shortcut, press Alt + H.

    Hidden Files In GUI Linux

    The other way is to click buttons to unhide files. First, click the view options button. Then tick Show Hidden Files.

    File And Folder Options
    Show Hidden Files button

    After ticking the option, the hidden files will appear.

    Can See The Files Now
    Hidden files appearing now

    Since the files and directories are sorted alphabetically, the hidden files will be listed after the unhidden files. This is because hidden files start with a period(.) and symbols come after alphabets in the sorting order.

    Hide files on Ubuntu (Terminal & GUI)

    Now that you know how to show hidden files, it’s time to learn how to hide files.

    There is no ‘Hide file’ option on Ubuntu. However, you can hide a file using the knowledge of how to show hidden files. Hidden files start with a period, remember? So all you have to do is add a period in front of the file or directory to hide it.

    For test purposes, I’m going to create a new file first. You can create a new file using the touch command.

    touch newfile
    Create A New File

    Now, you need to rename the file and put a period(.) in front of it. There are three ways you can rename a file.

    Method-1: Use the mv command

    In case you thought the mv command is used only for moving files, it can be used for renaming files as well. This is the full syntax of renaming a file using the mv command

    mv oldname newname

    So to rename your file or directory to make it hidden, you need to use the command like this

    mv newfile .newfile
    Rename A File In Ubuntu Linux
    Renaming a file to hide it

    The file will be hidden automatically.

    Method-2: Press F2 to rename the file

    Left-click on the file. Now press F2. You will get a prompt to rename the file. Type in the new name with a period(.) in the front. Press Rename to complete the action. Your file is now hidden.

    Rename The File To Hide It

    Method-3: Rename file from file options

    Right click on the file. You will see many options related to the file. You only need two. The Rename option or the Properties option.

    Rename Option In GUI
    Options for tweaking your file

    If you press the Rename option, you’ll get prompted to the rename window as before. You can rename the file with a period(.) in front of it.

    Pressing the Properties option will open a different window with all the properties of the file. You can rename the file from there in the same way to hide the file.

    File Properties

    Ubuntu Show Hidden Files – Conclusion

    Knowing how to hide and unhide your files can secure your important data from falling into the wrong hands. In this tutorial, we tried to cover every method to show or hide files and directories on Ubuntu. Hope this will help you as a beginner Ubuntu user.

    Let us know in the comments which method you liked most.

    GNU Linux Tips Ubuntu
    Share. Twitter Reddit Telegram WhatsApp Email
    Zunaid Ali
    • Website

    Zunaid Ali writes for businesses that breathe Technology. His tech tutorials have helped thousands understand the use of tech for a better life. He loves to code and learn new technologies.

    Related Posts

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    Pop!_OS VS Linux Mint, Which One to Select in 2023

    July 27, 2023

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    CPU Based Simple System Stability and Benchmark Tester for Ubuntu Linux – systester

    June 16, 2023

    Top Linux Distros for Web Development in 2023

    May 20, 2023
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    Transforming Geek Culture with Advanced Software Development

    April 8, 2024

    The Role of Technology in Enhancing Digital Signage Solutions

    February 21, 2024

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2026 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.