ARZ Host

Recommended Services
Supported Scripts

How to Show Hidden Files in Linux?

how to Show Hidden Files in Linux 2

Introduction to Linux and Hidden Files

Many of the delicate system files in Linux are hidden by default. System or application files are typically hidden to prevent unintentional changes. You will learn How to Show Hidden Files in Linux? in this Article from our blog to view and interact with hidden files in Linux by reading this guide.

  • A Linux-running computer
  • Access to a command line or terminal window (optional)

How to Show Hidden Files?

From the Command Line, Display Hidden Files

Enter the following command to display all files in a directory, including hidden ones:

  • ls –a

The current directory’s contents are listed by the ls command. All files, even hidden files, are listed using the -a switch.

To view the regular and hidden files in a directory other than the one where you are currently working:

  • /etc ls -a

substitute any other directory for /etc.

Pay Once, Host Forever-Get Your Lifetime Web Hosting Now!

Lifetime Hosting at a One-Time Price—Rate Starting at just $70/-

In a Graphical User Interface, Display Hidden Files (GUI)

If you feel more comfortable working in Gnome, there is a straightforward approach to displaying hidden files (or any other graphical interface).

  1. Go to the directory you wish to view first.
  2. Next, hit Ctrl+h.

If pressing Ctrl+h doesn’t work, select Show Hidden Files from the View menu.

See the Different Between Linux Server vs Windows Server to understand how Operating Systems work.

Tips for Hiding Files

Hide a directory or file How to Use the Linux Command Line. The mv (move) command can be used to mark a file as hidden.

1: Make a test file first. Create a test.txt file that is empty by using the touch command:

  • press test.txt

2: After that, relocate the file under a new filename to conceal it. The new filename begins with a period (.), indicating that it is hidden:

  • txt -> test.txt

3:  Display the contents of the current directory to confirm the file is now hidden:

  • ls

4: List the contents now, taking into account hidden files:

  • ls –a

In the second listing, test.txt should be visible.

Build your WordPress website – The Way you Want It

WordPress Hosting That Delivers – Get a Free SSL Certificate at just $0.99/month

In a graphical interface, conceal a file (GUI)

How to Show Hidden Files in Linux? A graphical interface can also be used to hide a file:

  1. Click the desired file using the right mouse button.
  2. Next, choose Rename.
  3. Add a period to the beginning of the filename to make it hidden.

To conceal a directory, follow the same procedure. Want to learn about Man Command? See our detailed article on Man Command in Linux

Password-Protected Hidden File Creation

From the command line, create a password-protected, hidden file:

1: Generate a new text file first before using the command line to create a hidden and password-protected archive file:

  • access test2.txt

2: Then, encrypt and compress that file:

  • zip test2.txt, zip —encrypt

3: The file’s password must be entered and verified.

4: Next, use the ls command; test2.zip should appear in the file list.

5: Next, enter the following to make the.zip file hidden:

  • transfer test2.zip to test2.zip

6: To make sure the file is truly hidden, run ls and ls -a.

Want to Learn How to Build Your Own Linux Kernel from Scratch? Click here!

Using the graphical user interface, create a hidden, password-protected file

In the graphical version of Linux, there are more stages involved in encrypting a file.

  1. To begin, navigate to your home directory in the File Manager.
  2. Click New Folder when you right-click a blank space (a folder and a directory are the same things).
  3. Click Create and give the folder the name test3.
  4. The Archive Manager will then be launched after you select Activities > Search and input archive manager.
  5. Move the fresh test3 folder into the Archive Manager window by dragging it there.
  6. The system will prompt you with a creation of an archive question. To create an archive, click.
  7. The filename in the Create Archive dialogue box must be test3. Click the drop-down to the right and choose the.zip format.
  8. Select Other options by clicking there. After entering a password for your archive, click Save.
  9. Shut off, Archive Manager. A test3.zip file ought to now be visible in the home directory.
  10. Select Rename from the context menu by selecting the test3.zip file, and then start the filename with a period.

Conclusion

Now that you know How to Show Hidden Files in Linux? you can use Linux to expose and conceal hidden files. In the event that you have to locate configuration files, these commands can be extremely helpful.

Data from web browsers, some program caches, and logs can all be found in hidden files.

For the Most Powerful and Reliable Hosting Services and Resources, Visit our Website, ARZ Host.

Latest Posts:

Table of Content