As a Linux system boots, the filesystem that becomes available is the top level, or rot filesystem, denoted with a single forward slash(/). The root filesystem /, also known as root directory, shouldn't be confused with the root superuser account or the superuser's home directory, / root. In a installation, the root filesystem could contain nearly everything on the system. As the Linux kernel boots, the partitions are mounted to the root filesystem, and together create a single unified filesystem. Everything on the system that is not stored in a mounted partition is stored locally in the / partition. The mounted filesystem are placed on separate partitions and possibly multiple disk drives. Here is the list of directories the root filesystem contains:
/ (the root directory): Since the only filesystem mounted at the start of the boot process is /, certain directories must be part of it to be available for the boot process. These include:
/bin and /sbin: Contains required system binary programs.
/dev: Contains device files.
/etc: Contains configuration information used on boot.
/lib: Contains shared libraries. These directories are always part of the single / partition.
/boot: This directories holds static files used by the boot loader, including kernel images. On system where kernel development activity occurs regularly, making /boot a partition eliminates the possibility that / will fill with kernel images and associated files during development.
/home: User files are usually placed in a partition. This is often the largest partition on the system and may be located on a separate physical disk or disk array.
/tmp: This directory is often a separate partition used to prevent temporary file from filling the root filesystem.
/var: Log files are stored here. This is similar to the situation with /tmp, where user files can fill any available space if something goes wrong or if the files are not cleaned periodically.
/usr: This directory hold a hierarchy of directories containing user commands, source code, and documentation. It is often quite large, making it a good candidate for its own partition. Because much of the information stored under /usr is static, some users prefer that it be mounted as read-only, making it impossible to corrupt.
In addition to the preceding six partitions listed, a swap partition is also necessary for a Linux system to enable virtual memory.
No comments:
Post a Comment