Thursday, August 6, 2009

Understanding Linux Directory Structure

Understanding Linux file system is easy and crucial for every Linux user and programmer. First of all users should know this fact that for Linux everything is a file. And be everything I mean everything including your hard disk, mouse, even folder are also treated as a special kind of file. Every Linux consist of the following folders:-

  • / :It is the starting point of the file system. "/" contains everything. Every file and every folder. It is the parent drive of Linux. You will find every directory listed below in "/" even though they may be in some other drive.

  • /boot : It is place which contains your bootloader. It also has the linux kernel and initrd module which is loaded during the boot process and are crucial for booting the system. Remember "Don't Ever Mess With /boot" unless you are ready with backup

  • /bin : This folder has all the executable or binary files in it. It contains all the application programs and commands.

  • /dev : This folder is the device folder. It has a file corressponding to every device attached to your computer which includes hard disks, network cards, printers and other such devices.

  • /etc : This folder has all the configuration files. This folder defines that how your system will behave overall. It has user lists, skel which is copied into user's home every time a user is created, graphics configurations, network configurations and lots of other such stuff.

  • /home : Home folder is a place where the user normally gets in when he/she logs in. Its like a pesonal place where other users are not allowed to get it. A user gets a personal place at /home/user-name by default.

  • /lib : This folder contains library files which help in smooth working of applications. If you ever encounters dependencies problems while installing any software then this folder is guilty.

  • /proc : This directory basically represents the current state of your machine. It contains files corresponding to each process running on your computer.

  • /sbin : This folder also contains binary files but of special type. These files are to be executed only by superuser. It contains commands like shutdown and of course not every user can be entrusted with shutting down the system.
  • /usr : The /usr directory contains files and programs meant to be used by all of the users on the system. for example you will find program related to date there.

No comments:

Post a Comment

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