Friday, February 24, 2012

Linux filesystem and directory structure

A file is a collection of data items stored on disk. It contains data of type picture, music, video, text, etc. Anything which is stored on disk must be in form of a file.
A directory is a set of files. In fact, Linux treats directory as a file. There is a root directory ( / ) on every linux system followed by number of sub-directories.

Linux Filesystem:
Following are the filesystems supported on Linux operating systems.

1. ext2 - This is like UNIX filesystem. It has the concept of blocks, inodes and directories.
2. ext3 - It is an enhanced version of ext2 with journaling capabilities.
3. ext4 - Ext4 has been added to Linux Kernel 2.6.28 onwards. It is a deeper improvement over ext3 than ext3 was over ext2. Ext4 modifies important data structures of the filesystem. It is a filesystem with an improved design, better performance, reliability and features
4. proc - It is a virtual filesystem present on every Linux system. It acts as an interface to internal data structures of the system
5. lsofs: A filesystem used by CDROM.
6. Sysfs: It is a ram-based filesystem initially based on ramfs. It is use to exporting kernel objects so that end user can use it easily.

Directory Structure:
Here is the Linux directory structure with brief description of each directory.
/bin - System binaries, including the command shell
/boot - Boot-up routines
/dev - Device files for all your peripherals
/etc - System configuration files
/home - User directories
/lib - Shared libraries and modules
/lost+found - Lost-cluster files, recovered from a disk-check
/mnt - Mounted file-systems
/opt - Optional software
/proc - Kernel-processes pseudo file-system
/root - Administrator’s home directory
/sbin - System administration binaries
/usr - User-oriented software
/var - Various other files: mail, spooling and logging

No comments:

Post a Comment