Which Command Allows You to View the Hidden Files in SSH?

Linux, by default, hides many crucial files for added protection. For example, system or application core files are often hidden files to prevent unintentional changes.

What happens if you wish to view or change the concealed files? Let's look at how Linux shows hidden files.

1) Type the following command in the terminal to display all files, including hidden files.

ls -a

The ls command simply displays the files in the current directory, while the ls command with the -a flag displays every file, even those that are hidden.

2) Enter the following command in the terminal to list all the files, including hidden ones, in a different directory.

ls –a /directory name

Replace the directory name with the directory you want to list all the files.


Was this answer helpful?

« Back