Linux Filesystem
UNIX/Linux filesystems are
very different from Windows. UNIX/Linux is organized in a hierarchy,
starting with "slash." Slash is this: / The rest of the directories
and subdirectories continue down from slash. For example, the directory,
/etc/httpd/ , is a subdirectory in the the /etc (pronounced "etsie")
directory. /etc/ is a directory in slash. Unlike Windows that represents
drives as letters (e.g., a:,c:, e:), all devices, including hard drives,
cdroms, and other storage media in Linux all fit into the normal directory
structure. Devices are mounted onto the file system tree and,
as a user, you might not be able to tell if a directory is actually
located on your own hard drive or on a hard drive of another computer.
Linux, allows for the great
level of flexibility in terms of its file systems. You can literally
put in four drives and "mount" them to various directories
in your tree. Here are some common mounts you should know about:
| / |
(Called
root), this is equivalent to C:\ in the DOS/Windows world. You cannot
run a Linux system without the root partition. All other partitions
are a subset of the root partition. |
| swap |
Unless
you have massive amounts of memory, you are going to need some swap
space. In Windows, you have Win386.swp; here, it's a separate drive
partition. |
| /boot |
This
contains the necessary stuff to start the machine, including the
base kernel. This partition is optional, but usually present. You
will not need to mess around in here if you have a running system. |
| /usr |
This
is the directory where global executables are stored. It can be
read-only, if you want. Generally speaking, most software is installed
here by default. |
| /dev |
This
is the directory where all of your devices are. There are a few
useful examples for you to know. /dev/hda is the first ide hard
drive. /dev/hdb is the second. /dev/sda would be the first SCSI
drive, and /dev/sg0 is your robotic arm. |
| /etc |
This
is where most configuration files are stored. You will spend a lot
of time in here if you are an administrator. Most files require
"root" access to change. |
| /var |
Many
of the system log files are here, as well as spools (mail, printer...) |
| /bin |
This
directory is the home of binary executables. These include the common
commands we have already learned like ls, cat, gzip and tar. |
|