Tuesday, July 13, 2010

File_System_Hierarchy_In_Linux

When I started using Linux, I was totally confused about file hierarchy in Linux.
i.e. which directory is used for which purpose ??

or if i want to view or change some settings then which files to access ??

and many more questions....

while googling for some articles on Linux file system I found this document quite helpful for Linux beginners so posting it here.


Linux File System Hierarchy

Linux has a tree type file system hierarchy . There would not be a tree without a root, and the same is true for the Linux file system. No matter how far away the directories branch, everything is connected to the root directory, which is represented as a single forward slash (/)

/ - root directory

/home - where directories are contained for each user,
/usr - pronounced 'user' and contains Linux commands and utilities
/bin - binary executable programs
/lib - program libraries, similar to Windows 'dll' files
/sbin - more executable programs and Linux utilities for administrative purposes
/doc - documentation

/src - source code to programs

/tmp - temporary work files

/etc - configuration files

/rc.d - scripts used during boot and shutdown process

/sysconfig - default configuration files

/sysconfig/network-scripts - network scripts

/sysconfig/daemons - special programs that run in background, such as print spooling

/var - user specific files

/log - log files containing system usage and errors

/spool - where spooled files are stored during print spooling process
/mail - where Email files are stored until retrieved by client Email program
/proc – Virtual file system that gives the information of running kernel.
/root - root's home directory
/opt - Typically contains extra and third party software.
/sbin - Programs for use by the system and the system administrator.


Note : Everything in linux is treated as a file

No comments:

Post a Comment