Fhs in Linux

Embed Size (px)

Citation preview

  • 8/3/2019 Fhs in Linux

    1/3

  • 8/3/2019 Fhs in Linux

    2/3

    Just to remind you, it is just a small introduction to filesystem , filesystem does have many more thingsto consider and, each filesystem have some specialized features which make it unique.

    Let, move on to the Linux File Hierarchy System (LFHS) which is also known as, File HierarchyStandard (FSH) due to its use in various OS

    The only function of FHS is to provide with standard directory structure so that, important systemconfiguration directories name & Location remain same across the different flavors of Linux and otherOS that follows the FHS standard. FHS is currenty maintain by the Free Standard Group (FSG), a non-profit organization

    Below Image shows LFHS layout

    We will wrap up now, with a brief intro to all these directories.

    /bin: This directory contains the commands which can be used by both system administrator &users.

    /boot: This directory contains everything required for boot process for e.g. kernel and initrd.

    /dev: This directory holds all special files and device files such as /dev/null, /dev/mouse,/dev/cdrom, /dev/cdrecorder etc.

    /etc: This directory keeps all system configuration files on local host. A configuration file is fileused to control program behavior. It must be static file and not executable binary file.

    /etc/opt/: This is place to keep host specific configuration file of 3 rd party softwareinstalled under/opt

    /etc/X11/: This is place to keep all X11 host-specific configuration. This directory isnecessary to allow local control if/usr is mounted read only.

    /etc/sgml/: configuration files for sgml are stored here but,they can be anywhere else in

    system. /etc/xml/: configuration files for xml should be stored here but,they can be any where

    else in system.

    /home: Users home directory used by users to save there work and other files. Howeverlocation of/home can vary from host-to-host so no program should relay on this location.

    /lib: This directory stores all shared library files which required for system while booting andthen to execute binary commands.

    /media: This directory is default mount point for removable media such as cdrom drive.

    /mnt: This directory provides location for mounting any file system temporarily and should be

    un-mounted once mounted file system is no longer required.

    /opt: This directory provides space to install any 3rd party software.

    /proc: This is virtual file system where in all system and kernel process status are stored mostlyin text file format.

    /root: This is home directory of root user (i.e. Administrator) its location may be somethingelse as per developer or local preference.

    /sbin: This directory keeps all utilities and command useful for system restore, maintenance,

    http://dhavalv.files.wordpress.com/2007/10/fhs.png
  • 8/3/2019 Fhs in Linux

    3/3

    booting, etc. which can be used only by the root or users with administrative privileges.

    /srv: Site-specific data which is served by the system

    /temp: Place for keeping temporary files used by programs for read-write hence it must beavailable to all programs.

    /usr: /usris the second major section of the file system./usr is shareable, read-only data. i.e.

    /usr should be shareable between various FHS-compliant hosts and must not be written to. /usr/bin/: Just like/bin directory, this directory also contains the commands which can

    be used by both system administrator & users.

    /usr/include/: This directory contains shared include files used by compilers

    /usr/lib/: Just like/lib directory, this directory stores all shared library files whichrequired for system while booting and then to execute binary commands.

    /usr/sbin/: Just like/sbin directory, this directory keeps all utilities and command usefulfor system restore, maintenance, booting, etc. which can be used only by the root orusers with administrative privileges.

    /usr/share/: This is place to keep read-only architecture independent data or anyprogram that contain data which need not be changed ever are kept here.

    /usr/src/: If you choose to install the source code during installation this is where entiresource code of your Linux OS will be placed.

    /urs/X11R7/: This directory is reserved for the X Window System, version 11 release 7,and related files

    /usr/local/: This directory is use by the system administrator when installing softwarelocally. It needs to be safe from being overwritten when the system software is updated.It may be used for programs and data that are shareable amongst a group of hosts, butnot found in/usr.

    /var: /varcontains variable data files. This includes spool directories and files, administrativeand logging data, and transient and temporary files

    This is all you need to know for now about about fileystem and filesystem hierarchy.To learn moreabout filesystem grab any book that explains Operating system concepts and, you can visit here formore details on FHS.

    Please note that these FHS standards are optional, one may follow only as much as required and scrapother things. Thus, you will find things differ from one OS to another and, even from one flavor ofLinux to another.

    http://www.pathname.com/fhs/pub/fhs-2.3.htmlhttp://www.pathname.com/fhs/pub/fhs-2.3.html