The Linux/Unix File system hierarchy standard

The file system hierarchy standard defines the directory 
structure of Unix and Unix based operating systems.
/ - Root Directory
The root directory is the top-level directory in the FHS,
All other directories are sub-directories of root.
Every single file and directory starts from the root directory.
Only root user has write privilege under this directory.
/bin – User Binaries
Contain binary executables.
Common Linux/Unix commands you need to use in single-user modes 
are located under this directory.
Commands used by all the users of the system are located here.
 Cat, ls, rpm, cp
A binary file is a computer file that is not a text file,it 
may contain any type of data,encoded in binary form for 
computer storage and processing purposes.
/boot - Boot Loader Files
Contains boot loader related files.
Kernel initrd, vmlinux, grub files are located under /boot.
 initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic.
A boot loader is a program written to load a more complex kernel. 
The boot loader ultimately has to Bring the kernel (and all the
kernel needs to bootstrap) into memory,provide the kernel with 
the information it needs to work correctly, Switch to an 
environment that the kernel will like, Transfer control to the kernel.
/etc - Configuration Files
Contain configuration files required by all programs.
This also contains startup and shutdown shell scripts used
to start/stop individual programs.
 /etc/resolv.conf, /etc/logrotate.conf.
configuration files, or config files configure the initial 
settings for some computer programs. They are used for user
applications, server processes and operating system settings.
The files are often written in ASCII (rarely UTF-8) and 
line-oriented, with lines terminated a newline or carriage 
return/line feed pair, depending on the operating system. 
They may be considered a simple database.
/dev – contain device file
Contain device files.
These include terminal devices, usb, or any device attached
to the system.
 /dev/tty1, /dev/usbmon0.
/home - Home Directories
Home directories for all users to store their personal
 /home/user, /home/user1.
/lib - System Libraries
Contains library files that supports the binaries located 
under /bin and /sbinLibrary filenames are either ld* or 
/sbin - System Binaries
Just like /bin, /sbin also contain binary executables. But, 
the linux commands located under this directory areused 
typically by system aministrator, for system maintenance purpose.
 iptables, reboot, fdisk, ifconfig, swapon.
/Root - home directory of the root user
Contains root user files and personal settings.
/opt - Optional add-on Applications
opt stands for optional.
Contain add-on applications from individual vendors.
add-on applications should be installed under either /opt/
or /opt/ sub-directory.
Add- on Applications:
Application software is a set of one or more programs designed 
to carry out operations for a specific application. 
Application software cannot run on itself but is dependent 
on system software to execute. Examples of application software
include MS Word, MS Excel, a console game, a library management 
system, a spreadsheet system etc.
/proc - Process Information
Contain information about system process.
This is a pseudo file system contains information about
running process. For example: /proc/{pid} directory contains 
information about the process switch that particular pid.
This is a virtual file system with text information about 
system resources. For example: /proc/uptime
/mnt - Mount Directory
Temporary mount directory where system admin can mount file
/tmp – Temporary Files
Directory that contains temporary files created by system and users.
Files under this directory are deleted when system is rebooted.
/usr – User Programs
Contains binaries, libraries, documentation, and source code for 
second level programs./usr/bin contains binary files for user 
programs. If you can’t find a user binary under /bin, look 
under /usr/bin. 
 at, awk, cc, less, scp
 ->/usr/sbin contains binary files for system
 administrators. If you can’t find a system binary under
 /sbin, look under /usr/sbin.
 atd, cron, sshd, useradd, userdel
 ->/usr/lib contains libraries for /usr/bin and /usr/sbin.
 /usr/local contains users programs that you install from
source. For example, when you install apache from source, 
it goes under /usr/local/apache
/var – Variable Files
var stands for variable files.
Variable data, including log files and printer spools.
Content of the files that are expected to grow can be found
under this directory.
This includes — system log files (/var/log); packages and 
database files (/var/lib); emails (/var/mail); 
print queues (/var/spool); lock files (/var/lock); 
temp files needed across reboots (/var/tmp).

/srv – Service Data
srv stands for service.
Contains server specific services related data.
For example, /srv/cvs contains CVS related data.

PDF Download Link Here: The Linux Filesystem Hierarchy Standard

Follow Innovation Begins Here on Twitter, innovationBeginsHere, Facebook , Google+ & Linkdin.

          Copyright © 2015[InnovationBeginsHere].All Rights Reserved.

2 thoughts on “The Linux/Unix File system hierarchy standard”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s