Every operating system has a method of storing its files and directories so that it can keep track of additions, modifications and other changes.
In Linux, every file is stored on the system with a unique name, in directories which can also hold other files and directories -- or, subdirectories.
You might think of the system as a tree-like structure, in which directories ``branch off.'' Those directories may contain -- or be the ``parent'' of -- other directories which may hold files or directories of their own.
Tip: Even though there are other Linux distributions, your Red Hat Linux system is likely to be compatible with them. The reason is because of the Filesystem Hierarchy Standard (also known as FHS). These guidelines help to standardize the way system programs and files are stored on all Linux systems. You can read more about the FHS at its website:
As long as we're logged into our user account -- which will help prevent disastrous mistakes -- let's take a look around.
The first stop on this tour ought to be the root directory, which will give us a larger picture of where things are.
At the shell prompt, then, let's type:
cd /
We'll see a prompt which looks like:
[billy@localhost /]
Now, let's see which directories ``branch off'' root by typing:
ls
Doesn't look like much, does it? Well, it's a little like viewing the tip of an iceberg. These are the parent directories of other directories, in which there may be other directories... and so on.
Here are just a few of the directories we're likely to find:
etc lib sbinusr var
There are more, but let's take a look in the /etc directory.
[billy@localhost /] cd etc [billy@localhost /etc] ls
Here, among other type of files and directories, we'll find configuration files, which are files that help make programs work for our system, store our program and system settings and more.
Among the directories in here, you'll see /etc/X11, which also contains directories and configuration files for the X Window System.
Let's look around a little in /usr. From our current location in /etc/skel, we can type:
[billy@localhost /skel] cd /usr [billy@localhost /usr] ls
In /usr, we're going to find a number of directories which hold some of our system's most important programs, and files (see Figure 29).
In /usr/man we'll find the system manual pages; other documentation which isn't covered by man pages will be found in /usr/doc.
In /usr/X11R6, we'll find files related to the X Window System, including configuration and documentation files.
Although we may think of something more literary when we hear the word ``libraries,'' in /usr/lib we'll find files which are considered libraries for our system. In this context, libraries are files containing commonly-used snippets of code which can be shared by many programs.
(For more on using GnoRPM, see its chapter in the Red Hat Linux Installation Guide.)