Section 4.15. Important Directories


4.15. Important Directories

You already know about /home, where user files are stored. As a system administrator and programmer, several other directories will be important to you. Here are a few, along with their contents:


/bin

The most essential Unix commands, such as ls.


/usr/bin

Other commands. The distinction between /bin and /usr/bin is arbitrary; it was a convenient way to split up commands on early Unix systems that had small disks.


/sbin

Very common commands used by the superuser for system administration.


/usr/sbin

Commands used less often by the superuser for system administration.


/boot

Location where the kernel and other files used during booting are sometimes stored.


/etc

Files used by subsystems such as networking, NFS, and mail. Typically, these contain tables of network services, disks to mount, and so on. Many of the files here are used for booting the system or individual services of it and will be discussed elsewhere in this book.


/var

Administrative files, such as log files, used by various utilities.


/var/spool

Temporary storage for files being printed, sent by UUCP, and so on.


/usr/lib

Standard libraries, such as libc.a. When you link a program, the linker always searches here for the libraries specified in -l options.


/usr/lib/X11

The X Window System distribution. Contains the libraries used by X clients, as well as fonts, sample resources files, and other important parts of the X package. This directory is usually a symbolic link to /usr/X11R6/lib/X11.


/usr/include

Standard location of include files used in C programs, such as <stdio.h>.


/usr/src

Location of sources to programs built on the system.


/usr/local

Programs and datafiles that have been added locally by the system administrator.


/etc/skel

Sample startup files you can place in home directories for new users.


/dev

This directory contains the so-called device files, the interface between the filesystem and the hardware (e.g., /dev/modem represents your modem in the system).


/proc

Just as /dev is the interface between the filesystem and the hardware devices, /proc is the interface between the filesystem and the running processes, the CPU, and memory. The files here (which are not real files, but rather virtual files generated on the fly when you view them) can give you information about the environment of a certain process, the state and configuration of the CPU, how your I/O ports are configured, and so forth.


/opt

The /opt directory is often used for larger software packages. For example, it is quite likely that you will find the KDE Desktop Environment in /opt/kde3 (or /opt/kde4, once version 4 is out), the office productivity suite OpenOffice in /opt/OpenOffice.org, and the Firefox web browser in /opt/firefox.



Running Linux
Running Linux
ISBN: 0596007604
EAN: 2147483647
Year: 2004
Pages: 220

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net