Linux Basic
The Linux filesystem hierarchy follows the File hierarchy standard (2004). All directories serve a standard purpose. The following directories are explained with a short purpose of each.
/ base level
/bin system binaries
/boot boot loader
/dev hardware devices
/etc configuration files
/home user home
/lib system core libraries
/proc process info
/root root home
/sbin root binaries
/tmp temporary
/var variables … log files, mail files, temporal fies. Lots of i/o
/media removable media
/mnt mounted devices
/usr programs that are not essential to run are stored here
/usr/bin
/usr/lib
/usr/local local to system
/usr/local/bin
Explanation
/bin
The bin directory contains several useful commands for all users.
/boot
This directory contains everything required for the boot process except for configuration files not needed at boot time.
/dev
This directory contains files representing the attached onboard and peripheral hardware devices attached to the system.
/etc
This directory contains all configuration files related to system.
/home
A specific home directory is assigned to each user in a multi user Linux environment.
/initrd
initrd provides the capability to load a RAM disk by the boot loader.
/lib
This directory contains kernel modules and shared library images which are required to boot the system and run the commands in the root filesystem
/lost+found
In case of system crash or power failure the result of recovery operation will be placed in this directory.
/media
This directory contains subdirectories which are used as mount points for removable media such as floppy disks, CDROMs and zip disks.
/mnt
This directory usually contains mount points or sub-directories to mount the storage devices
/opt
This directory is reserved for all the software and add-on packages that are not part of the default installation.
/proc
This directory contains runtime system information e.g. system memory, devices mounted, hardware configuration, etc
/root
This is the home directory of the System Administrator.
/sbin
This directory contains programs related to system administration, maintenance and hardware configuration.
/usr
This directory contains user binaries, their documentation, libraries and header files,
/var
This directory contains system logging files, mail and printer spool directories and temporary files.
/srv
This directory contains site-specific data served by the system.
/tmp
This directory is used by many programs for temporary storage of data.