Introduction

If you’ve ever wondered what the deal was with the Linux file structure, I suggest you take a look at the Filesystem Hierarchy Standard. It is considered a guideline to the Linux filesystem. We’re gonna hit the high points here, and try to figure out how this hierarchy fits into your daily Linux life.

Directories

Back to top

“/”

“/” (pronounced slash) is the trunk of the file tree. It serves as a starting point of the filesystem. Every other file or directory is subordinate to “/”. Note:“/” is sometimes called “root”. This should not be confused with “/root” which we’ll describe next. This is the partition which the kernel should use as root after bootloading.
Back to top

/root

/root is usually the home directory for the root user. It typically contains installation logs and a few scripts used by the system administrator. It is a good idea to at least make sure it is on the root partition.
Back to top

/bin

/bin is where the essential user binaries are stored for both admin and users, such as ls, cat, mv. It should be on the root partition.
Back to top

/sbin

/sbin is the location of essential binaries used for system administration and by the system itself. It should be on the root partition.
Back to top

/lib

/lib is where libraries needed by binaries in the /bin and /sbin are stored. This directory also needs to be on the root partition.
Back to top

/boot

/boot is where the boot loader (from the MBR) looks to load the kernel. This is before any other partition is mounted or any user mode programs are ran. To the bootloader, this partition is root. Then, the bootloader loads the kernel (which resides in the /boot partition) and tells the kernel which partition it should use as root.
Back to top

/etc

/etc, is an acronym for….. well actually no one agrees on what it stands for. The majority seems to think it stands for et cetera. it is basically where your configuration files go.
Back to top

/home

/home is the place for user account directories. Typically, each user has a directory within /home where they have all control over it and whatever may be beneath it. Also, user specific configurations may be stored in it’s sub structure.
Back to top

/usr

/usr contains the subdirectories /usr/bin, /usr/sbin, and /usr/lib which perform similar purposes as /bin, /sbin, and /lib, but are not needed at boot time. Non-essential user and system binaries may be stored here. /usr contains also documentation for the binaries and libraries.
Back to top

Conclusion

If you want to learn more or need a more precise lesson, check out the FHS.

Leave a Reply