/etc/profile
)/etc/bashrc
). Only interactive shells and
user scripts read this file. See TODO Appendix M for a sample
.bashrc
file./etc/shadow
in encrypted form. [2]Listing and description of attached hardware devices. This information is in text form and can be extracted and parsed.
bash$ grep -A 5 AUDIO /etc/sysconfig/hwconf class: AUDIO bus: PCI detached: 0 driver: snd-intel8x0 desc: "Intel Corporation 82801CA/CAM AC'97 Audio Controller" vendorId: 8086
Note: This file is present on Red Hat and Fedora Core installations, but may be missing from other distros.
Sysadmins and anyone else writing administrative scripts should be intimately familiar with the following system directories.
bash
).fsck
).Et cetera. Systemwide configuration scripts.
Of particular interest are the /etc/fstab
(filesystem table),
/etc/mtab
(mounted filesystem table), and the
/etc/inittab
files.
Mount.
Directory for mounting hard drive partitions, such as
/mnt/dos
, and physical devices. In newer Linux distros, the
/media
directory has taken over as the preferred mount point
for I/O devices.
Variable (changeable) system files.
This is a catchall "scratchpad" directory for data generated while a Linux/UNIX machine is running.
System boot directory.
The kernel, module links, system map, and boot manager reside here.
Warning: Altering files in this directory may result in an unbootable system.
csh
,
tcsh
, and other shells not related to or descended from the
classic Bourne shell (sh
).[2]In older versions
of UNIX, passwords were stored in /etc/passwd
, and that
explains the name of the file.[3]Some early UNIX systems had a fast,
small-capacity fixed disk (containing /
, the root partition), and a
second drive which was larger, but slower (containing /usr
and other
partitions). The most frequently used programs and utilities therefore
resided on the small-but-fast drive, in /bin
, and the others on the
slower drive, in /usr/bin
.
This likewise accounts for the split between /sbin
and
/usr/sbin
, /lib
and /usr/lib
, etc.