-->
Page 303
In addition to the files discussed, many other configuration files are found in the /etc directory. The process of modifying and maintaining configuration files is covered in Chapter 15, "Essential System Administration," and Chapter 16, "Advanced System Administration."
The /home directory is where all the home directories for all the users on a system are
stored. This includes home directories for actual users (people) and for users such as HTTPD.
An interesting feature of Linux is that the home directory for the user root is usually stored as
/home/root. This is different from many UNIX systems, where
/ is the home directory for the user root.
By convention, the /mnt directory is the directory under which removable media such as
CD-ROMs, floppy disks, Zip disks, or Jaz disks are mounted. Usually the
/mnt directory contains a number of subdirectories, each of which is a mount point for a particular device
type. On my system, the /mnt directory looks like the following:
cdrom/ floppy/ zip/
By using subdirectories under /mnt to house all the mounted removable media, you keep the / directory clean.
The /tmp and /var directories are used to hold temporary files or files with constantly varying content.
The /tmp directory is usually a dumping ground for files that only need to be used briefly and can afford to be deleted at any time. It usually is quite unstructured, but on a multiuser system, most users abide by the convention of creating a personal directory (named the same as their username) in /tmp for storing their temporary files. The most common use of /tmp (other than as a location for throwaway files) is as a starting point for building and installing programs.
The /var directory is a bit more structured than /tmp and usually looks something like the following:
catman/ local/ log/ nis/ run/ tmp/ lib/ lock/ named/ preserve/ spool/ yp/
Of these directories, the /var/log directory is one of the directories with which all users
should be familiar, as most of the messages generated by the system are stored in it. On my system,
/var/log contains the following files:
./ dmesg maillog savacct spooler wtmp ../ httpd/ messages secure usracct cron lastlog pacct sendmail.st uucp/
Page 304
Of these files, the following are very helpful when attempting to diagnose system problems:
By convention, the /usr directory is where most programs and files directly relating to users of the system are stored. It is in some ways a miniversion of the / directory. On my system, the /usr directory looks like the following:
X11/ etc/ libexec/ share/ X11R6/ games/ local/ src/ X386@ i486-linuxaout/ man/ tmp@ bin/ include/ openwin/ dict/ info/ opt/ doc/ lib/ sbin/
The contents of the various directories are briefly described in the following paragraphs.
The /usr/bin and /usr/sbin directories hold the vast majority of the executables available on a system. The function and type of the executables placed into these directories follow the same general convention as for /bin and /sbin.
The /usr/opt directory under Linux is equivalent to the /opt directory in Solaris. It is the location where optional software packages are usually installed. For example, the Caldera Internet-Office Suite is usually installed into/usr/opt.
The /usr/X11 and /usr/X11R6 directories and subdirectories contain all of the X Window_ related files, such as man pages, libraries, and executables. Most Red Hat Linux systems contain only /usr/X11R6, the 6 revision of the X Window version 11, but some older systems might contain /usr/X11R5 or even /usr/X11R4, the 5 and 4 revisions of X Window version 11.
Although X is the primary windowing environment under Linux, most installations will also contain the /usr/openwin directory for storing files that use open windows. This includes programs like olwm, textedit, and workman.
The /usr/local directory is the location where local programs, man pages, and libraries are installed. At many sites, most of the directories in /usr are kept the same on every computer, but anything that needs to be installed on a particular machine is placed in /usr/local, thus identifying those files as local files. This makes maintenance of large numbers of systems easier.
Finally, one of the most useful directories under /usr is /usr/dict. This is where the local dictionary, called /usr/dict/words, for the system is stored. Most versions of /usr/dict/words contain about 25,000 words, but some can be as large as a hundred thousand or more.
Page 305
One of the most powerful and innovative utilities available in Red Hat Linux is RPM, the Red Hat Package Manager. It can be used to install, uninstall, upgrade, query, verify, and build software packages.
A software package built with RPM is an archive of files and some associated information, such as a name, a version, and a description. A few of the advantages of RPM packages over the traditional tar.gz method of software distribution are as follows:
In addition to these features, RPM is available for many flavors of Linux and UNIX, making it one of the emerging utilities for distributing software packages.
The major modes in which RPM can be run are the following:
The options to invoke the major modes are given in parentheses. These major modes are covered in detail in subsequent sections.
All of these major modes understand the following options:
-vv | Prints out all debugging information; useful to see what exactly RPM is doing |
--quiet | Prints out very little information, only error messages |
In addition to these, there are a few other "minor" modes that are useful. These are as follows: