Viewing Linux Hidden Directories and System Configuration Files With the Linux LS Command

linux34 Viewing Linux Hidden Directories and System Configuration Files With the Linux LS Command
Clyde E. Boom asked:




Almost all of the files that are used to configure settings on a Linux system are plain text files, as opposed to files that are coded or encrypted. Some Linux directories and files are prefixed with a . (dot). These files do not normally appear in directory listings when the directory is viewed with a GUI utility, such as Nautilus, or when viewed with a command that lists directories and files, such as the ls command.

These directories and files are commonly called “dot” directories and “dot” files and are “hidden” from regular directory listings. These directories and files typically contain configuration settings.

For example, each user’s home directory contains a Linux configuration file called .bashrc that provides configuration settings for the bash shell.

As another example, when the KDE desktop is used, a Linux directory named .kde is created in the home directory of a user that is using this desktop. This directory contains one or more directories and files that contain configuration settings for the KDE desktop.
Viewing Linux Hidden Directories and Files – Linux ls Command Examples

Run the following Linux cd command to change into your home directory, in case you aren’t currently “in” your home directory. The ~ (tilde) character represents your home directory.

$ cd ~

Now run the ls command with the option to see the “non-hidden” directories and files in your home directory.

$ ls -l

The ls command below uses the -a option to show “all” directories and files in the current directory (in addition to using the -l for “long” option), including the Linux hidden directories and files.

$ ls -la

The ls command below shows all hidden files beginning with “.bash” (and ending in anything else). This command shows some of the “bash shell” configuration files.

Linux Commands Training Tips: When you are working at the Linux command line prompt and running Linux commands, you are working in the “bash shell environment”.

$ ls -la .bash*

Now use the less command to look at the contents of the .bashrc configuration file for the bash shell.

$ less .bashrc

The Linux commands and concepts covered here are applicable to: Ubuntu, Debian, Red Hat, SUSE, Fedora, Slackware, openSUSE – and ALL other Linux distributions.

Caffeinated Content

Random Posts

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment