Featured

    Featured Posts

Linux - Filesystem Hierarchy - Directory Structure

Linux Directory Structure Overview:
Before we proceed with learning commands, it’s better to get a detailed idea about Linux's file structure.
The Linux file system structure looks like upside down tree.
This hierarchy is very easy to understand as all directory names are all self-explanatory.

Below picture shows how the directories were organised.





To list the Directories under " / "
Open Terminal
Change to / directory by typing “ cd / 
Type “ 
ls “ to view the contents ( Directories)


The Directory Structure in Unix & Linux are a unified Directory Structure where in all the directories are unified under the " " Root file system. Irrespective of where the File System is physically mounted all the directories are arranged hierarchically under the Root file system.

The Linux Directory Structure follows the "Filesystem Hierarchy Structure (FHS)" maintained by the Free Standards Group although most of the distributions sometimes tend to deviate from the standards.


Below is the detailed description of different directories under the Linux Filesystem Hierarchy :

/
The root directory.
Top level Directory, parent of all other directories.

/boot
Includes Linux boot related files / startup files, including the Linux kernel. Can be small; 16MB is usually adequate for a typical modular kernel. If you use multiple kernels, such as for testing a kernel upgrade, increase the size of this partition accordingly.

/root
Home directory of the root user.
Contains Root user related files

/home
Home directories for almost every user.
Contains normal user files
eg: /home/kiran

/bin
Contains Binary files.
Essential command line utilities.
Normal user commands.

/sbin
Super user binary files.
System administration/ Super user / root user commands.

/etc
Edit to configure.
Contains almost all  basic configuration files.

/usr
Unix Shareable resource.
Contains the packages which were installed with OS.
Includes many system administration commands & utilities.
  
/opt
Optional directory.
Contains packages which were installed manually.
eg: WordPerfect or Star Office.
  
/dev
Contains all device files.
eg: /dev/sda

/lib
Contain library files
Program libraries for the kernel and various command line utilities

/mnt
The mount point for removable media, including floppy drives,CDROMs.
eg: /mnt/partition1

/proc
Currently running kernel related processes, including device assignments such as IRQ ports, I/O addresses, and DMA channels.
Contains process related files.
eg: cat /proc/loadavg
       cat /proc/uptime

/tmp
Contains temporary files.
By default, Red Hat Linux deletes all files in this directory periodically.

/var
Variable data, including log files, mails and printer spools etc.,
eg: cat /var/log/messages
       cat /var/log/boot.log

/media
Contains removable media.

/srv
Services offered – server data



To list Directories under " / "



Graphical View of Directories under " / "







------------------------------------------------------------------------------------------------------------

author

Gnanasekhar Reddy

-----------

Get Free Email Updates to your Inbox!

Post a Comment

www.CodeNirvana.in

COPYRIGHT © 2017. Powered by Blogger.

Featured Posts

Featured Posts

Featured Posts

Popular Posts

Translate

Total Page Views

blog counter
Copyright © gskLinux | Linux Tutorials | Designed By | Gnanasekhar