/bin - binary applications (most of your executable files)
/bin is a place for most commonly used terminal commands, like ls, mount, rm, etc.
This directory contains several useful commands that are used by both the system administrator as well as non-privileged users. /bin usually contains the shells like bash, csh etc. as well as the much used commands like cp (copy), mv (move/rename), rm (remove), cat (concatenates files and displays them to the standard output), ls (list directory contents). There also is /usr/bin, which contains other user binaries (not essential for the user). The binaries in /bin however, a user cannot do without.
/boot - files required to boot (such as the kernel, etc)
/boot contains files needed to start up the system, including the Linux kernel, a RAM disk image and bootloader configuration files.
This directory contains the system.map file as well as the Linux kernel. GRUB (the boot manager) places the boot sector backups in this directory.
/dev - your devices (everything from drives to displays)
/dev contains all device files, which are not regular files but instead refer to various hardware devices on the system, including hard drives.
This is a very interesting directory that highlights one important characteristic of the Linux file system stated earlier – everything is a file or a directory.
Tips
/dev/sr0 is my dvd rom. I can mount is differently to /media/cdrom using /etc/fstab
add the following to /etc/fstab
/dev/sr0 /media/cdrom udf,iso9660 ro,user,noauto 0 0
/etc - just about every configuration file for your system
/etc contains system-global configuration files, which affect the system's behavior for all users.
This directory contains all the configuration files for your system, usually in the form of filename.conf.
/etc/profile.d - contains scripts that are run by /etc/profile upon login.
/etc/rc.d - contains a number of shell scripts that are run on bootup at different run levels. There is also typically an rc.inet1 script to set up networking (in Slackwar), an rc.modules script to load modular device drivers, and an rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.
/etc/rc.d/init.d - contains most of the initialization scripts themselves on an rpm-based system.
/etc/rc.d/rc*.d - where “*” is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On rpm-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.
etc/skel - directory containing several example or skeleton initialization shells. Often contains subdirectories and files used to populate a new user’s home directory.
/etc/X11 - configuration files for the X Window system
/home - locally stored user files and folders
/home home sweet home, this is the place for users' home directories.
Linux is a multi-user environment, so each user is also assigned a specific directory which is accessible only to them and the system administrator. These are the user home directories, which can be found under /home/username. This directory also contains the user specific settings for programs.
/lib - system libraries (similar to Program Files)
/lib contains very important dynamic libraries and kernel modules
This contains all the shared libraries that are required by system programs. Windows equivalent to a shared library would be a DLL file.
/lost+found - lost and found for lost files
Linux should always go through a
proper shutdown. Sometimes your
system might crash or a power
failure might take the machine
down. Either way, at the next boot,
a lengthy file system check using
e2fsck will be done. e2fsck will go
through the system and try to re-
cover any corrupt files that it finds.
The result of this recovery opera-
tion will be placed in this directory.
The files recovered are not likely to
be complete or make much sense
but there always is a chance that
something worthwhile is recov-
ered.
/media - mounted (or loaded) devices such as cdroms, digital cameras, etc.
/media is intended as a mount point for external devices, such as hard drives or removable media (floppies, CDs, DVDs).
This folder keeps all the removable
drives that can be mounted auto-
matically to the file system. Inside
you will find at least a folder identi-
fying your optical unit. SD cards
and USB devices are mounted here
too. This folder isn’t a standard one
in Linux but is encountered in many
distributions.
/mnt - mounted file systems
/mnt is also a place for mount points, but dedicated specifically to "temporarily mounted" devices, such as network filesystems.
This is a generic mount point
under which you mount your file
systems or devices. Mounting is
the process by which you make
a file system available to the sys-
tem. After mounting your files,
they will be accessible under the
mount-point. This directory usu-
ally contains mount points or
sub-directories where you mount
your floppy and your CD. You can
also create additional mount-
points here if you want. There is
no limitation to creating a mount-
point anywhere on your system
but convention says that you do
not litter your file system with
mount-points.
/opt - location for “optionally” installed programs
/opt can be used to store addition software for your system, which is not handled by the package manager.
This directory contains all the soft-
ware and add-on packages that
are not part of the default installa-
tion. It is not used very often as it’s
mostly a standard in Unix installa-
tions.
/proc - dynamic directory including information about and listing of processes
/proc is a virtual filesystem that provides a mechanism for kernel to send information to processes.
A special directory that identifies
all your processes in real time.
/root - “home” folder for the root user
/root is the superuser's home directory, not in /home/ to allow for booting the system even if /home/ is not available.
The home directory of the user root.
This is not to be confused with the
system root, which is directory at
the highest level in the file system.
/sbin - system-only binaries (see /bin)
/sbin contains important administrative commands that should generally only be employed by the superuser.
/sbin contains binaries just like
/bin does, only that these are avail-
able only for the root user, other us-
ers not having privileges to work
with them.
Security-Enhanced Linux (SELi-
nux) is a Linux feature that pro-
vides a variety of security policies,
including the U.S. Department of
Defense style of mandatory ac-
cess controls, through the use of
Linux Security Modules (LSM) in
the Linux kernel. This folder thus
contains all the files necessary
for SELinux, but only if SELinux is
installed on the system. Ubuntu is
one of the few Linux distributions
that support the use of this secu-
rity enhancement.
/srv can contain data directories of services such as HTTP (/srv/www/) or FTP.
/sys - contains information about the system
/sys is a virtual filesystem that can be accessed to set or obtain information about the kernel's view of the system.
/tmp - temporary files
This contains mostly files that
are required temporarily. Many
programs use this to create lock
files and for temporary storage of
data. On some systems, this di-
rectory is cleared out at boot or at
shutdown.
/tmp is a place for temporary files used by applications.
/usr - applications mainly for regular users
/usr/local/bin - the place to put your own programs. They will not be overwritten with upgrades.
/usr/share/doc - documentation.
One of the most important direc-
tories in the system as it contains
all the user binaries. X and its
supporting libraries can be found
here. User programs like telnet,
ftp are also placed here. /usr/
doc contains useful system docu-
mentation. /usr/src/linux con-
tains the source code for the Li-
nux kernel.
/var - mainly logs, databases, etc.
/var is dedicated variable data that potentially changes rapidly; a notable directory it contains is /var/log where system log files are kept.
It contains spooling data like mail
and also the output from the print-
er daemon. The system logs are
also kept here in /var/log/mes-
sages.
In Unix and Unix-like operating systems, the Unix directory structure is a convention for filesystem layout.
Several attempts exist to standardize the Unix filesystem layout, such as the "Filesystem Hierarchy Standard,"[1] however, targeted primarily at Linux. Also, as part of the "Linux Standards Base", a common filesystem layout is defined, to encourage interoperability among different Linux distributions
Read more: http://en.wikipedia.org/wiki/Unix_directory_structure
The Filesystem Hierarchy Standard (FHS) defines the main directories and their contents in Linux operating systems. For the most part, it is a formalization and extension of the traditional BSD filesystem hierarchy.
The FHS is maintained by the Linux Foundation, a non-profit organization consisting of major software and hardware vendors, such as HP, Red Hat, IBM and Dell.
The current version is 2.3, announced on January 29, 2004.
Read more: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
Read more: http://www.pathname.com/fhs/