A Brief Introduction to Linux Filesystem Hierarchy

A filesystem is the methods and data structures that an operating system uses to keep track of files on a disk or partition; that is, the way the files are organized on the disk. The word is also used to refer to a partition or disk that is used to store the files or the type of the filesystem. Thus, one might say I have two filesystems meaning one has two partitions on which one stores files

Like UNIX operating system structure, Linux chooses to have a single hierarchical directory structure. Everything starts from the root directory, represented by "/", and then expands into sub−directories instead of having so−called 'drives'. In the Windows environment, one may put one's files almost anywhere: on C drive, D drive, E drive etc. Such a file system is called a hierarchical structure and is managed by the programs themselves (program directories), not
by the operating system. On the other hand, Linux sorts directories descending from the root directory "/" according to their importance to the boot process.

So Linux file system starts with "/", the root directory. All other directories are 'children' of this
directory.The partition which the root file system resides on is mounted first (practically,to mount a partition -C,D,E in Windows and hda1,hda2,hda3 in Linux-we just have to click on its respective icon)during boot and the system will
not boot if it doesn't find it.

The Root (“/”) directory contains the following sub-directories:

/bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host−specific system configuration
/lib Essential shared libraries and kernel modules
/media Mount point for removeable media
/mnt Mount point for mounting a filesystem temporarily
/opt Add−on application software packages
/sbin Essential system binaries
/srv Data for services provided by this system
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data

All the above directories contain numerous sub-directories of their own.These sub-directories also having their own boot precedence and function to do.


Root directory in Ubuntu 8.04

Linux uses the frontslash / instead of the backslash \ as in Windows it's because it's simply following the UNIX tradition.

If you install a program in Windows, it usually stores most of its files in its own directory structure. A help file for instance may be in C:\Program Files\[program name]\ or in C:\Program Files\[program−name]\help or in C:\Program Files\[program −name]\humpty\dumpty\doo. In Linux, programs put their documentation into
/usr/share/doc/[program−name], man(ual) pages into /usr/share/man/man[1−9] and info pages into
/usr/share/info. They are merged into and with the system hierarchy.

For complete linux guides please visit
the Linux Documentation Project official homepage
http://www.tldp.org/

Comments

0 Responses to "A Brief Introduction to Linux Filesystem Hierarchy"

Get Updated

Subscribe to feed

Enter your email address:

Delivered by FeedBurner

Blog Archive