Welcome Guest | Login | »

Tech-WhitePrints™

etc : UNIX/LINUX - File-system Hierarchy System

Modified on Sun, 26 Feb 2017 17:35 by Biswajit Dash Categorized as et cetera
The FHS (File-system Hierarchy System) specifications on which UNIX/LINUX operating systems base their folder structure. Everything in an UNIX/LINUX system is a file, including files, devices, processes etc. The FHS designates directory for each.

DirectoryUsage
/The starting point of any UNIX/LINUX system is the root directory, represented by /. Everything else in the system appears under this.
binaries (executable files)
/binThe binaries for use by all users are contained under /bin directory. For example - the files for executable commands like grep, date, cat etc., appear as a file under this directory.
/opt/{app}/bin(alternate /bin directory) The binaries for any external software (which is not part of the OS distribution) are normally stored in application specific directory created under /opt. For example - the binaries for apache web server can be stored under /opt/apache/bin directory. (see /opt later).
/home/{user}/bin (alternate /bin directory) Users can install software under their respective home directories, and the binaries for the same stored in user specific directories. For example - all binaries installed by user biswajit can be found under /home/biswajit/bin directory.
/sbinContains all system binaries needed for configuring the system, for example - fdisk, fsck etc.
/libThe executable binaries under /bin and /sbin normally reference one or more libraries. These libraries are stored under this directory.
/optAny software not part of the UNIX/LINUX distribution is normally installed under the optional software directory /opt. This can contain sub-directories like /bin, /lib underneath it.
configuration
/bootContains all files needed to boot the OS. It may also contain boot-loader files.
/etcThe *.conf files for configuring the system are stored under /etc directory.
/etc/init.dAll scripts for starting/stopping daemons (services) are stored in this directory.
/etc/skelThe skeleton (template) directory structure which is copied to the home directory of each newly created user.
data
/homeThe parent home directory containing data folder for each user.
/home/{user}The home directory for the specific user. For example - the home directory for user biswajit may be /home/biswajit.
/rootThe data folder for root user is normally /root, instead of /home/root folder.
/srvAny data served from the system, like ftp or www, can be contained in this directory.
/mediaThe mount point for all removable medias like CD, USB devices.
/mediaThe mount point for all removable medias like CD, USB devices.
/mntA temporary mount point used for administration purpose.
/tmpThis directory stores temporary data managed by the operating system. The OS may store all such files either in the disk or in RAM as it decided.
in-memory data (no physical file)
/devThis directory is used by kernel to organize physical devices like CD, HDD etc.
/dev/ttyContains directory like dev/tty1, /dev/tty2, etc., representing the terminals/consoles connected to the system.
/dev/nullA special device folder that ignores any input to it. It is useful in discarding unwanted outputs.
/dev/procProvides a view of the kernel and the processes it manages at the moment of time.
/usr(Unix System Resources) This directory is used to store shared/read-only data.
/varAny data with unpredictable size is stored in this directory.
/var/logContains the log files from different applications.
/var/cacheStores cache data for applications.
/var/spoolThe spool directory for mail, printer etc.


Paper Code: TWP_1004.10, Version: 1.0, Author: Biswajit Dash, License: CC-BY-ND, Published: Aug-2016


























Tech-WhitePrints™ | e-Mail: biswajitdash@hotmail.com | LinkedIn: biswajit-dash-ind | Powered by screwturn wiki.

Creative Commons License This work by Tech-WhitePrints™ is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.