Sysadmins and anyone else writing administrative scripts should be intimately familiar with the following system directories.
/bin
Binaries (executables). Basic system programs and utilities (such as bash).
/usr/bin [1]
More system binaries.
/usr/local/bin
Miscellaneous binaries local to the particular machine.
/sbin
System binaries. Basic system administrative programs and utilities (such as fsck).
/usr/sbin
More system administrative programs and utilities.
/etc
Et cetera. Systemwide configuration scripts.
/etc/rc.d
Boot scripts, on Red Hat and derivative distributions of Linux.
/usr/share/doc
Documentation for installed packages.
/usr/man
The systemwide manpages.
/tmp
System temporary files.
/sys
Systemwide process directory. Contains information and statistics about running processes. This is newly added to Linux with the 2.6.X kernels.
/var
Variable (changeable) system files. This is a catchall "scratchpad" directory for data generated while a Linux/UNIX machine is running.
/var/log
Systemwide log files.
/var/spool/mail
User mail spool.
/lib
Systemwide library files.
/usr/lib
More systemwide library files.
/boot
System boot directory. The kernel, module links, system map, and boot manager reside here.
Altering files in this directory may result in an unbootable system. |
[1] | 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. |