Linux Filesystem Overview
Every item stored in a LINUX filesystems belongs to one of four types:
1. Ordinary files
Ordinary files can contain text, data, or program information. Files cannot contain other files or directories. Unlike other operating systems, LINUX filenames are not broken into a name part and an extension part (although extensions are still frequently used as a means to classify files). Instead they can contain any keyboard character except for '/' and be up to 256 characters long (note however that characters such as *,?,# and & have special meaning in most shells and should not therefore be used in filenames). Putting spaces in filenames also makes them difficult to manipulate - rather use the underscore '_'.
Directories are containers or folders that hold files, and other directories.
To provide applications with easy access to hardware devices, LINUX allows them to be used in much the same way as ordinary files. There are two types of devices in LINUX - block-oriented devices which transfer data in blocks (e.g. hard disks) and character-oriented devices that transfer data on a byte-by-byte basis (e.g. modems and dumb terminals).
A link is a pointer to another file. There are two types of links - a hard link to a file is indistinguishable from the file itself. A soft link (or symbolic link) provides an indirect pointer or shortcut to a file. A soft link is implemented as a directory file entry containing a pathname.
The starting point of the linux filesystem is "/". All other folders and files reside somewhere inside this folder. Even the various storage media (hard disk , CD/DVD drive , USB drive all reside in this folder)
The following table summarizes the filesystem of a typical LINUX install.
|/bin||Common programs, shared by the system, the system administrator and the users.|
|/boot||The startup files and the kernel, vmlinuz. In recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.|
|/dev||Contains references to all the CPU peripheral hardware, which are represented as files with special properties.|
|/etc||Most important system configuration files are in /etc, this directory contains data similar to those in the Control Panel in Windows|
|/home||Home directories of the common users.|
|/initrd||(on some distributions) Information for booting. Do not remove!|
|/lib||Library files, includes files for all kinds of programs needed by the system and the users.|
|/lost+found||Every partition has a lost+found in its upper directory. Files that were saved during failures are here.|
|/misc||For miscellaneous purposes.|
|/mnt||Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.|
|/net||Standard mount point for entire remote file systems|
|/opt||Typically contains extra and third party software.|
|/proc||A virtual file system containing information about system resources. More information about the meaning of the files in proc is obtained by entering the command man proc in a terminal window.|
|/root||The administrative user's home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.|
|/sbin||Programs for use by the system and the system administrator.|
|/tmp||Temporary space for use by the system.|
|/usr||Programs, libraries, documentation etc. for all user-related programs.|
|/var||Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.|