Overview
a brief introduction
- bin - user binary
- boot - boot loader
- dev - device (manipulate your hard drives)
- etc - config files
- home - user home dir except root
- initrd.img
- lib - system library
- lib64
- lost+found
- media - removable devices (CD, USB etc)
- mnt - mount file systems
- opt - optional (eg. desktop environment)
- proc - process info
- root - root user’s home
- run
- sbin - system binary (runnable only by root)
- srv - service data
- sys
- tmp - temporary (delete on restart)
- usr - Unix System Resources (user programs)
- usr/bin - user programs
- usr/lib - user system lib
- usr/local - programs that’s manually compiled rather than install from package
- usr/sbin - root programs
- var - variables, application data (eg. MySQL db, cached files)
Reference: Linux Directory Structure (File System Structure) Explained with Examples1
Some important folders
bin, sbin, usr/bin, usr/sbin
bin/ stores commands needed during boot-up that might be needed by normal users. eg. cat, tar…
Applications such as Firefox are stored in /usr/bin, while important system programs and utilities such as the bash shell are located in /bin.
sbin/ is like bin but commands are not intended for normal users. Commands run by LINUX. eg. ifconfig, fdisk…
/usr/bin is all user commands, while /usr/sbin is system admin commands not needed on the root filesystem. e.g. most server programs.
proc
This filesystem is not on a disk. Exists in the kernels imagination (virtual).
It holds information about kernel parameters and system configuration.
usr
/usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc….
Reference: Linux Directory Structure
A brief history
Originally, there was /bin for programs, /dev for device files and /lib for extra executable code and /usr for user data.
The source code was also often provided somewhere under /usr.
And there were a few files in the operating system that didn’t fit in any of the existing categories. This included a passwd file containing users’ passwords, and an mtab file written by mount.
At first, there was no connotation that files in /etc were configuration files. In these very early days, if you wanted to customize something, you’d be recompiling that part of the system. As Unix got more powerful, there were more and more things you could do without recompiling. As Unix got used more widely, there were more and more things people wanted to do, and they found ways of doing them without going through the trouble of recompiling.
So /etc filled up with more and more text files that people could and did customize, hence it gradually became the configuration directory.
With the creation of /sbin to contain programs intended only for the system administrator, /etc ended up containing only text files, many of which can be customized by the system administrator.
Reference: Answer by Gilles on StackExchange