The Linux filesystem

There is no doubt that one of the most confusing things about Linux (at least to the novice user) is its filesystem. Since most of us grew accustomed to the way Windows does things, thinking about the filesystem in terms of the A or C drive seems almost natural, but understanding the differences between /etc and /var takes us to a whole different world. The present article tries to make it easier for new Linux users to understand the filesystem.
If you need more information, feel free to visit the Filesystem Hierarchy Standard (FHS) site. This is the organization that tries to lay out a filesystem standard not only for the different Linux distributions, but also for UNIX.
So, here is a short list of the most important elements in the Linux filesystem:
The root directory is considered to be the top of the whole filesystem both in Linux and UNIX. To some extent, it is the equivalent of the C drive in DOS and Windows. All other filesystems are under root, and this should not be confused with the /root filesystem, which is the home directory to the root account (the one used by the system administrator).
This directory contains all the files that are necessary to boot up the Linux operating system. These files are necessary to allocate memory and mount all other filesystems. If you are still using older versions of the Linux Loader (LILO), you'd better make sure that this filesystem falls within the 1024 limit otherwise your system will not be able to boot at all. Since its size is can be quite small (around 30 Mb should be more than enough), you can perfectly create a small partition for the /boot filesystem close to the beginning of your hard drive and then mount the rest from somewhere else. This tactic is particularly useful if you need to share the hard drive with other operating systems, such as Windows.

Another thing that is also difficult to understand for anyone who is totally new to Linux or UNIX is that everything is a file in this environment. Thus, the hardware devices are also mounted in the regular filesystem, in this case in the /dev filesystem. Here you will find basically all the hardware that you have, among many other things: /dev/cdrom, /dev/fd0, /dev/hda1, etc.



AFS Protocol Spec v1.0

DAFS API Spec v1.0
(235KB PDF)

Reference Implementations