Linux Filesystem or Directory Structure
Filesystem
Hierarchy Standard (FHS) defines the directory structure and directory contents, the names, locations, and permissions for many file types and directories in Linux.
The Directory Structure of Linux is as Below.
Directory
|
Content
|
/ |
Primary hierarchy root and root directory of the entire file system hierarchy.
|
/bin
| Common programs, commands binaries (executables) shared by the system, the system administrator and the users. It needs to available in single user mode. Ex cat, ls ,cp. |
/boot
|
The startup files required to boot the system e.g. The kernel, vmlinuz. In some recent distributions also called GRUB.
|
/dev
|
Device files. These include terminal devices, usb, or any device attached to the system.
|
/etc
| Most important system configuration files are in /etc, It should contain no binaries; any binaries should be moved to /bin/ or /sbin/ |
/home
| Home directories of the common users. |
/lib
| Library files that needed to execute the binaries in /bin/ and /sbin/. These shared library images are used to boot the system or execute commands within the root file system. |
/lost+found
| Every partition has a lost+found in its upper directory. Files that were saved during failures are here. |
/mnt
| The /mnt/ directory is used for temporarily mounted file systems, such as NFS file system mounts. |
/media
|
Mount point for
removable media. Such as CD-ROM, USB storage etc.
|
/opt
| Contains extra and third party software and add-on packages that are not systems default software. A software package that installs to /opt/ creates a directory bearing its name, e.g. /opt/packagename/. |
/proc
| It contains information about system resources that either extract information from the kernel or send information to it. Examples of such information include system memory, cpu information, and hardware configuration. |
/root
| The administrative user's home directory. Note the difference between /, the root directory and /root, the home directory of the root user. |
/sbin
| Contains binaries for use by the system and the system administrator. /sbin/ require root privileges to use |
/srv
| Site specific data that served by the system. This directory gives users the location of data files for a particular service, such as FTP, WWW, or CVS. |
/tmp
| Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any work. |
/usr
| Programs, libraries, documentation etc. for all user-related programs. The /usr/ directory is often on its own partition and is mounted read-only. |
/var
| Storage for all variable files (continuously changing files) and temporary files created by users, such as log files, the mail queue, the print spooler area. |
Fig : Filesystem Hierarchy in Linux
No comments:
Post a Comment