The concept of directory structure on Linux

This article is aimed to provide directory structure information on Linux Operation System. All of the directories are following the Filesystems Hierarchy Standard (FHS). Directories are specified purpose to store files.

  • /bin : Essential user command binaries (for use all users)
    • All the executable binary programs that can be executed by all users .
    • E.g. cat, chmod, chown, date, mv, mkdir, cp, bash, etc.
  • /boot : Static files of the boot loader
    • It contains every this required for the booting system.
  • /dev : Device files
    • It is the location of hardware device files.
  • /etc : Host-specific system configuration
    • It contains all configuration files for system and Applications. In general, all files that can be viewed by all users. But only root can revise it. It must be static and cannot be an executable binary.
  • /home : User home directories
    • Home directory of users. Therefore, no program should rely on this location. The space of each user directory is limited by the system.
  • /lib : Essential shared libraries and kernel modules
    • This directory contains shared library image which is needed to boot the system.
  • /media : Mount point for removable media
    • This directory contains subdirectories which are used as mount point for removable media.
    • E.g. cd-rom, floppy disk, etc.
  • /mnt : Mount point for a temporarily mounted filesystem
    • It provide you mount temporarily filesystem as needed.
  • /opt : Add-on application software packages
    • Optional is abbreviated as opt. This directory is reserved for the installation of add-on application software packages.
  • /root : Home directory for the root user
    • Super user’s home directory.
  • /sbin : System binaries
    • Executable binary programs that can be executed  only by root user.
  • /srv : Data for services provided by this system
    • Service is abbreviated as srv. It contains site-specific data which are serviced by a server.
    • E.g. WWW, FTP, etc.
  • /tmp : Temporary files
    • Temporary files are written by the program. It can also be stored by the user. But the important files cannot be stored in there. It has a daemon service of tmpwatch, which cleans files by a period time.
  • /usr : Secondary hierarchy
    • Unix Shared Resource is abbreviated as usr. It is the second major section of the filesystem, that contains software packages. /usr is shareable, read-only data.
  • /var : Variable data
    • This includes spool directories and files, administrative and logging data, and transient and temporary files.
  • /proc : Kernel and process information virtual filesystem
    • A virtual filesystem which contains information about running process.
    • E.g. cpuinfo, dma, interrupts, ioports, net, etc. 


Reference : http://www.pathname.com/fhs/ Filesystem Hierarchy Standard (FHS)

No comments:

Post a Comment