All files in UNIX are “related” to one another. The file system in UNIX is a collection of all these related files organised in a hierarchical (an inverted tree) structure. This system has been adopted by MS-DOS and is visually represented by:
Each of directories under the root is organized to store specific types of files. All the files are stored on the disk in a main directory, which is called a root (/) directory. The root directory is subdivided into other directories: bin, home, usr, etc and dev. Every single file and directory starts from the root directory. Only root user has write privilege under this directory.
The /bin directory stores many utilities available in Linux. These utilities are the commands in the Linux operating system and stores in the binary format. Common Linux commands you need to use in single-user modes are located under this directory. For example: ps, ls, ping, grep, cp Just like /bin, /sbin also contain binary (executable) files, usually for system administration. For example fdisk, iptable, reboot and ifconfig utlities. The /etc directory stores the data related to the operating system, including the essential operating system programs and configuration files. This also contains startup and shutdown shell scripts used to start/stop individual programs. For example passwd The /dev directory stores all the device-related files for the Linux operating system. These include terminal devices, usb, or any device attached to the system. For example: /dev/tty1, /dev/usbmon0 The /proc directory contains information about system processes like process id, process priority and other information. The /var directory contains information specific to different utilities available in Linux. Var stands for variable files. This includes system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp); The /temp directory contains temporary files created by system and users. Files under this directory are deleted when system is rebooted. The /usr directory stores the operating system files that are not required during the startup process. It Contains binaries, libraries, documentation, and source-code for second level programs. The /usr/bin directory is different from the /bin directory. The /home directory contains the home directories of all the users to stores their personal files. For example /home/Vijay, /home/Santosh. The /boot directory contains the files for booting the system. Kernel initrd, vmlinux, grub files are located under /boot The /lib directory contains the libraries for the compilers, such as C, java installed in the Linux operating system. Contains shared library files and sometimes other kernel-related files. The /opt directory contains add-on applications from individual vendors. Add-on applications should be installed under either /opt/ or /opt/ sub-directory. The /mnt directory are used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively The /media directory are used to mount directory for removable devices temporary. srv stands for service. Contains server specific services related data. For example, /srv/cvs contains CVS related data.