Monday, July 28, 2014

Linux File System / Linux Directory Structure

Lets discuss about the Linux file System structure. This is a Common Topic of Linux because in this topic you can understand Linux core concept. Mostly when you are working on live environment. You need many time Linux File System for create new documents. Every Directory of Linux File System has particular mean. If you want to understand easily Linux directory Structure then read below.
linux-file-system

Levels of Linux File System Structure



0 ‘s ( root(/) ) Level Linux File System:-

This is core level of Linux file system. Under this section only one part and name is root directory (/).Every Linux File System are start from root directory only super user ( Administrator ) has privileges to write file or directory in this section.
file-system-structure

1’s level Linux File System



/bin – User binaries

This directory has all local user binary executable files. Which command you used in daily purpose or not have root privileges are part in this directory. Like as ps, ls, grep, cp and many more.

/sbin – User Binaries

This directory has all super user privileges commands. Which command only can used if you have super user or equal privileges. Directory /sbin also have executable file like as ifcfg , mkfs , init, fdisk , lsmod, etc.

/etc – Configuration Files

Basically this directory is mostly used because mostly program configuration file present here. If you want to edit or configure file then you need /etc directory. If you need to start and stop service of any particular program then also need it. For Example: yum.conf , host.conf, ntp.conf, resolve.conf etc.

/dev – Device Files

/dev Directory contain system related devices files. Here you can find out terminal related files or your secondary storage devices also present in /dev directory.

/tmp-Temporary Files

/tmp Directory contain temporary files. This is created by Users of System. When System is restart your previous temporary files are remove automatically.

/proc – Process Information

/proc Directory contain system information mean all about physical server. How much resources do you have? Means if you want to find out your system Primary memory then you should check under this directory #cat meminfo. Under this directory you can find various important file like as cpuinfo, meminfo, patitions, diskstat, services, uptime, version..etc.
proc-directory-structure

/var – Variable Directory

/var Directory contains variable files. And also contain system log file or error files related to executed application. If you want to find out your system log then you should check under /var/log directory.
var-directory

/home – Home Directory

/home Directory contains all local user personal files or directories. For Example : /home/sham, /home/john, /home/merry ..etc.

/lib – System Libraries

/lib Directory contains system library files. These file support binary located under /bin or /sbin. For Example: libk5crypto.so.3.1, libwrap.so.0, libxtables.so.4.0.0..etc.
lib-directory

/boot – Boot Loader Files

/boot Directory contain boot related files. Means kernel related files like as initrd, grub files, vmlinux ..etc.

/mnt – Mount Directory

/mnt Directory contains mount point of physical hard disk or partitions.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.