Linux Directory Structure simplified

1
11

Linux Basic Directory Structure hierarchy starts from root (/) at the same time the administrator name also termed root , both are conceptually isolated ones

/ – File System root

The Entire Directory Structure Starts From here , and no files are usually saved here.ie it contains only directories, ie. sub directories

/boot

This is where linux saves its boot information. Linux kernel(vmlinuz) like files are saved here,

a typical /boot listing is as below

root@server2 [/boot]# ls
./ config-2.6.18-128.el5 lost+found/ symvers-2.6.18-128.el5.gz
../ grub/ message System.map-2.6.18-128.el5
aquota.user initrd-2.6.18-128.el5.img quota.user vmlinuz-2.6.18-128.el5
root@server2 [/boot]#

/dev

The most important thing in linux is that it treats devices as files. we can read and write to devices as they are files., all devices compatible for kernel is located in /dev

Eg. cdrom is located in /dev/cdrom

/mnt

Every storage device in a linux system shoud attach to a directory before it is accessed, this process of attachment is called mounting, /mnt directory contains maount points for various storage devices,

ie. /mnt/cdrom for cdrom

/etc

This is the configuration files master directory , to which sub directories may be created for separate services

Some common configuration files are

/etc/fstab : File System Related Configurations, say if we want to mount windows FAT Drives in linux , we can configure lines here

/etc/passwd : User security settings can be configure from here

/etc/inittab : Initial System Startup configurations

/bin, /usr/bin

Executables located here, /bin contains frequently used commands like ls,pwd, etc .. where /usr/bin stores application binaries like vim,mix

/sbin, /usr/sbin

System Administration Commands and Application binaries

/usr

This is the largest Directory in Linux Structure where users and system saved files

/usr/doc
Documents of users.

/usr/src
Source code for applications and kernel

/usr/include
General Include files

/usr/X11R6
Files for X window System

/usr/local

If our System is in Network /usr directory may physically in other machine for easy file sharing and management, then we need local files in /usr/local

even if our system is in standalone mode applications from third parties can be kept here for maintaining our file structure neat and tidy

/lib

Library files sharing between programs kept here

 

/home

This is the directory for Newly created users , ie. if we create a user named User1 there will create a directory /home/User1 aganist this user and this will be User1 s Home directory

/root

This is the Administrator Home Directory

/var

This contains Variable data in the System running like logs,mails etc..

/var/log

Application, , service and error logs fall here

/var/mail

Incoming Mails stored here

/var/spool

Queued process files stored here temporarily like in case of printing

/tmp

is the directory for temporary Files

/proc

This is actually a virtual directory , it contains entries corresponding to various services running on the system.

/lost+found

Here is the system stores files on a system crash. ie like a restore point

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here